summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dwm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/dwm.c b/dwm.c
index 627afa9..85978d8 100644
--- a/dwm.c
+++ b/dwm.c
@@ -336,7 +336,7 @@ struct Client {
int sfx, sfy, sfw, sfh; /* stored float geometry, used on mode revert */
#endif // SAVEFLOATS_PATCH / EXRESIZE_PATCH
int oldx, oldy, oldw, oldh;
- int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+ int basew, baseh, incw, inch, maxw, maxh, minw, minh, hintsvalid;
int bw, oldbw;
unsigned int tags;
#if SWITCHTAG_PATCH
@@ -1002,6 +1002,8 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact)
if (*w < bh)
*w = bh;
if (resizehints || c->isfloating || !c->mon->lt[c->mon->sellt]->arrange) {
+ if (!c->hintsvalid)
+ updatesizehints(c);
/* see last two sentences in ICCCM 4.1.2.3 */
baseismin = c->basew == c->minw && c->baseh == c->minh;
if (!baseismin) { /* temporarily remove base dimensions */
@@ -2394,7 +2396,6 @@ manage(Window w, XWindowAttributes *wa)
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
#endif // BAR_FLEXWINTITLE_PATCH
configure(c); /* propagates border_width, if size doesn't change */
- updatesizehints(c);
if (getatomprop(c, netatom[NetWMState]) == netatom[NetWMFullscreen])
setfullscreen(c, 1);
updatewmhints(c);
@@ -2730,7 +2731,7 @@ propertynotify(XEvent *e)
arrange(c->mon);
break;
case XA_WM_NORMAL_HINTS:
- updatesizehints(c);
+ c->hintsvalid = 0;
break;
case XA_WM_HINTS:
updatewmhints(c);
@@ -4620,6 +4621,7 @@ updatesizehints(Client *c)
#endif // SIZEHINTS_RULED_PATCH
#endif // SIZEHINTS_PATCH
c->isfixed = (c->maxw && c->maxh && c->maxw == c->minw && c->maxh == c->minh);
+ c->hintsvalid = 1;
}
void