Adding sizehints patch
This commit is contained in:
14
dwm.c
14
dwm.c
@@ -3950,7 +3950,11 @@ updatesizehints(Client *c)
|
||||
|
||||
if (!XGetWMNormalHints(dpy, c->win, &size, &msize))
|
||||
/* size is uninitialized, ensure that size.flags aren't used */
|
||||
#if SIZEHINTS_PATCH || SIZEHINTS_RULED_PATCH
|
||||
size.flags = 0;
|
||||
#else
|
||||
size.flags = PSize;
|
||||
#endif // SIZEHINTS_PATCH | SIZEHINTS_RULED_PATCH
|
||||
if (size.flags & PBaseSize) {
|
||||
c->basew = size.base_width;
|
||||
c->baseh = size.base_height;
|
||||
@@ -3982,6 +3986,16 @@ updatesizehints(Client *c)
|
||||
c->maxa = (float)size.max_aspect.x / size.max_aspect.y;
|
||||
} else
|
||||
c->maxa = c->mina = 0.0;
|
||||
#if SIZEHINTS_PATCH || SIZEHINTS_RULED_PATCH
|
||||
if (size.flags & PSize) {
|
||||
c->basew = size.base_width;
|
||||
c->baseh = size.base_height;
|
||||
c->isfloating = 1;
|
||||
}
|
||||
#if SIZEHINTS_RULED_PATCH
|
||||
checkfloatingrules(c);
|
||||
#endif // SIZEHINTS_RULED_PATCH
|
||||
#endif // SIZEHINTS_PATCH
|
||||
c->isfixed = (c->maxw && c->maxh && c->maxw == c->minw && c->maxh == c->minh);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user