diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-03-01 05:08:34 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-03-04 06:23:24 +0200 |
| commit | b6a533ef47d75c2f945f333f87065589472b4830 (patch) | |
| tree | d042f12834daab7a53e2d195da13b84930d9b1d6 | |
| parent | ad64298f5f6d56e85e5ab859333a168bd5565c35 (diff) | |
rework configure request
| -rw-r--r-- | monsterwm.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/monsterwm.c b/monsterwm.c index 0db78ca..e3dea3e 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -308,14 +308,12 @@ void clientmessage(XEvent *e) { * the gaps that otherwise could have been created */ void configurerequest(XEvent *e) { - client *c = wintoclient(e->xconfigurerequest.window); + XConfigureRequestEvent *ev = &e->xconfigurerequest; + client *c = wintoclient(ev->window); if (c && c->isfullscrn) setfullscreen(c, True); - else { /* keeping the window happy costs 10 lines ..fuuuu! shrink them! */ - XWindowChanges wc; wc.border_width = e->xconfigurerequest.border_width; - wc.x = e->xconfigurerequest.x; wc.width = e->xconfigurerequest.width; - wc.y = e->xconfigurerequest.y; wc.height = e->xconfigurerequest.height; - wc.sibling = e->xconfigurerequest.above; wc.stack_mode = e->xconfigurerequest.detail; - XConfigureWindow(dis, e->xconfigurerequest.window, e->xconfigurerequest.value_mask, &wc); + else { + XConfigureWindow(dis, ev->window, ev->value_mask, &(XWindowChanges){ ev->x, + ev->y, ev->width, ev->height, ev->border_width, ev->above, ev->detail }); XSync(dis, False); } tile(); |
