flexwintitle: allow flexwintitle to control window borders
This commit is contained in:
8
dwm.c
8
dwm.c
@@ -1692,10 +1692,12 @@ focus(Client *c)
|
||||
detachstack(c);
|
||||
attachstack(c);
|
||||
grabbuttons(c, 1);
|
||||
#if !BAR_FLEXWINTITLE_PATCH
|
||||
if (c->isfloating)
|
||||
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFloat].pixel);
|
||||
else
|
||||
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
|
||||
#endif // BAR_FLEXWINTITLE_PATCH
|
||||
setfocus(c);
|
||||
} else {
|
||||
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
|
||||
@@ -2063,10 +2065,12 @@ manage(Window w, XWindowAttributes *wa)
|
||||
|
||||
wc.border_width = c->bw;
|
||||
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
|
||||
#if !BAR_FLEXWINTITLE_PATCH
|
||||
if (c->isfloating)
|
||||
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColFloat].pixel);
|
||||
else
|
||||
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
|
||||
#endif // BAR_FLEXWINTITLE_PATCH
|
||||
configure(c); /* propagates border_width, if size doesn't change */
|
||||
#if !FLOATPOS_PATCH
|
||||
updatesizehints(c);
|
||||
@@ -3348,10 +3352,12 @@ togglefloating(const Arg *arg)
|
||||
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
||||
#endif // !FAKEFULLSCREEN_PATCH
|
||||
c->isfloating = !c->isfloating || c->isfixed;
|
||||
#if !BAR_FLEXWINTITLE_PATCH
|
||||
if (c->isfloating)
|
||||
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFloat].pixel);
|
||||
else
|
||||
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
|
||||
#endif // BAR_FLEXWINTITLE_PATCH
|
||||
if (c->isfloating) {
|
||||
#if SAVEFLOATS_PATCH || EXRESIZE_PATCH
|
||||
if (c->sfx != -9999) {
|
||||
@@ -3497,10 +3503,12 @@ unfocus(Client *c, int setfocus)
|
||||
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
||||
#endif // LOSEFULLSCREEN_PATCH
|
||||
grabbuttons(c, 0);
|
||||
#if !BAR_FLEXWINTITLE_PATCH
|
||||
if (c->isfloating)
|
||||
XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColFloat].pixel);
|
||||
else
|
||||
XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel);
|
||||
#endif // BAR_FLEXWINTITLE_PATCH
|
||||
if (setfocus) {
|
||||
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
|
||||
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
|
||||
|
Reference in New Issue
Block a user