diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-08-29 18:05:02 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-08-29 18:05:02 +0200 |
| commit | 70a3e62257d05946176aad3dbe19047d3bb705c1 (patch) | |
| tree | 2018d3eb3b41a5ab00796866c7fdc84f35b5c990 | |
| parent | fixed (diff) | |
| download | dwm-70a3e62257d05946176aad3dbe19047d3bb705c1.tar.gz dwm-70a3e62257d05946176aad3dbe19047d3bb705c1.zip | |
now dwm enforces max screen size also in tiled mode on non-floating clients which are maximized
| -rw-r--r-- | event.c | 27 |
1 files changed, 14 insertions, 13 deletions
| @@ -150,7 +150,6 @@ buttonpress(XEvent *e) | |||
| 150 | static void | 150 | static void |
| 151 | configurerequest(XEvent *e) | 151 | configurerequest(XEvent *e) |
| 152 | { | 152 | { |
| 153 | int ox, oy, ow, oh; | ||
| 154 | unsigned long newmask; | 153 | unsigned long newmask; |
| 155 | Client *c; | 154 | Client *c; |
| 156 | XConfigureRequestEvent *ev = &e->xconfigurerequest; | 155 | XConfigureRequestEvent *ev = &e->xconfigurerequest; |
| @@ -158,10 +157,20 @@ configurerequest(XEvent *e) | |||
| 158 | XWindowChanges wc; | 157 | XWindowChanges wc; |
| 159 | 158 | ||
| 160 | if((c = getclient(ev->window))) { | 159 | if((c = getclient(ev->window))) { |
| 161 | ox = c->x; | 160 | if(!c->isfloat && (arrange != dofloat) && c->ismax) { |
| 162 | oy = c->y; | 161 | synev.type = ConfigureNotify; |
| 163 | ow = c->w; | 162 | synev.xconfigure.display = dpy; |
| 164 | oh = c->h; | 163 | synev.xconfigure.event = c->win; |
| 164 | synev.xconfigure.window = c->win; | ||
| 165 | synev.xconfigure.x = sx; | ||
| 166 | synev.xconfigure.y = sy + bh; | ||
| 167 | synev.xconfigure.width = sw - 2; | ||
| 168 | synev.xconfigure.height = sw - 2 - bh; | ||
| 169 | synev.xconfigure.border_width = ev->border_width; | ||
| 170 | synev.xconfigure.above = None; | ||
| 171 | XSendEvent(dpy, c->win, True, NoEventMask, &synev); | ||
| 172 | return; | ||
| 173 | } | ||
| 165 | gravitate(c, True); | 174 | gravitate(c, True); |
| 166 | if(ev->value_mask & CWX) | 175 | if(ev->value_mask & CWX) |
| 167 | c->x = ev->x; | 176 | c->x = ev->x; |
| @@ -192,19 +201,11 @@ configurerequest(XEvent *e) | |||
| 192 | synev.xconfigure.height = c->h; | 201 | synev.xconfigure.height = c->h; |
| 193 | synev.xconfigure.border_width = c->border; | 202 | synev.xconfigure.border_width = c->border; |
| 194 | synev.xconfigure.above = None; | 203 | synev.xconfigure.above = None; |
| 195 | /* Send synthetic ConfigureNotify */ | ||
| 196 | XSendEvent(dpy, c->win, True, NoEventMask, &synev); | 204 | XSendEvent(dpy, c->win, True, NoEventMask, &synev); |
| 197 | } | 205 | } |
| 198 | XSync(dpy, False); | 206 | XSync(dpy, False); |
| 199 | if(c->isfloat) | 207 | if(c->isfloat) |
| 200 | resize(c, False, TopLeft); | 208 | resize(c, False, TopLeft); |
| 201 | else if(c->ismax) { | ||
| 202 | resize(c, False, TopLeft); | ||
| 203 | c->x = ox; | ||
| 204 | c->y = oy; | ||
| 205 | c->w = ow; | ||
| 206 | c->h = oh; | ||
| 207 | } | ||
| 208 | else | 209 | else |
| 209 | arrange(NULL); | 210 | arrange(NULL); |
| 210 | } | 211 | } |
