diff options
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -89,7 +89,7 @@ struct Client { | |||
| 89 | float mina, maxa; | 89 | float mina, maxa; |
| 90 | int x, y, w, h; | 90 | int x, y, w, h; |
| 91 | int oldx, oldy, oldw, oldh; | 91 | int oldx, oldy, oldw, oldh; |
| 92 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; | 92 | int basew, baseh, incw, inch, maxw, maxh, minw, minh, hintsvalid; |
| 93 | int bw, oldbw; | 93 | int bw, oldbw; |
| 94 | unsigned int tags; | 94 | unsigned int tags; |
| 95 | int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; | 95 | int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; |
| @@ -345,6 +345,8 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact) | |||
| 345 | if (*w < bh) | 345 | if (*w < bh) |
| 346 | *w = bh; | 346 | *w = bh; |
| 347 | if (resizehints || c->isfloating || !c->mon->lt[c->mon->sellt]->arrange) { | 347 | if (resizehints || c->isfloating || !c->mon->lt[c->mon->sellt]->arrange) { |
| 348 | if (!c->hintsvalid) | ||
| 349 | updatesizehints(c); | ||
| 348 | /* see last two sentences in ICCCM 4.1.2.3 */ | 350 | /* see last two sentences in ICCCM 4.1.2.3 */ |
| 349 | baseismin = c->basew == c->minw && c->baseh == c->minh; | 351 | baseismin = c->basew == c->minw && c->baseh == c->minh; |
| 350 | if (!baseismin) { /* temporarily remove base dimensions */ | 352 | if (!baseismin) { /* temporarily remove base dimensions */ |
| @@ -1059,7 +1061,6 @@ manage(Window w, XWindowAttributes *wa) | |||
| 1059 | XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); | 1061 | XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); |
| 1060 | configure(c); /* propagates border_width, if size doesn't change */ | 1062 | configure(c); /* propagates border_width, if size doesn't change */ |
| 1061 | updatewindowtype(c); | 1063 | updatewindowtype(c); |
| 1062 | updatesizehints(c); | ||
| 1063 | updatewmhints(c); | 1064 | updatewmhints(c); |
| 1064 | XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); | 1065 | XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); |
| 1065 | grabbuttons(c, 0); | 1066 | grabbuttons(c, 0); |
| @@ -1233,7 +1234,7 @@ propertynotify(XEvent *e) | |||
| 1233 | arrange(c->mon); | 1234 | arrange(c->mon); |
| 1234 | break; | 1235 | break; |
| 1235 | case XA_WM_NORMAL_HINTS: | 1236 | case XA_WM_NORMAL_HINTS: |
| 1236 | updatesizehints(c); | 1237 | c->hintsvalid = 0; |
| 1237 | break; | 1238 | break; |
| 1238 | case XA_WM_HINTS: | 1239 | case XA_WM_HINTS: |
| 1239 | updatewmhints(c); | 1240 | updatewmhints(c); |
| @@ -1989,6 +1990,7 @@ updatesizehints(Client *c) | |||
| 1989 | } else | 1990 | } else |
| 1990 | c->maxa = c->mina = 0.0; | 1991 | c->maxa = c->mina = 0.0; |
| 1991 | c->isfixed = (c->maxw && c->maxh && c->maxw == c->minw && c->maxh == c->minh); | 1992 | c->isfixed = (c->maxw && c->maxh && c->maxw == c->minw && c->maxh == c->minh); |
| 1993 | c->hintsvalid = 1; | ||
| 1992 | } | 1994 | } |
| 1993 | 1995 | ||
| 1994 | void | 1996 | void |
