From b9a58cfc42d79619b088281c713f6f4f63e9d26a Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Mon, 9 Jul 2012 22:52:26 +0300 Subject: rework configurerequest function - no need to know the client of the window --- monsterwm.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/monsterwm.c b/monsterwm.c index 1828829..46dadaa 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -285,17 +285,11 @@ void clientmessage(XEvent *e) { * appropriate values as requested, and tile the window again so that it fills * the gaps that otherwise could have been created */ void configurerequest(XEvent *e) { - Desktop *d = NULL; - Client *c = NULL; XConfigureRequestEvent *ev = &e->xconfigurerequest; - - if (!wintoclient(ev->window, &c, &d) || !c->isfull) { - XWindowChanges xwc = { ev->x, ev->y, ev->width, ev->height, ev->border_width, ev->above, ev->detail }; - XConfigureWindow(dis, ev->window, ev->value_mask, &xwc); - XSync(dis, False); - } else setfullscreen(c, True); - - if (!c || !(c->isfloat || c->istrans)) tile(c ? d:&desktops[currdeskidx]); + XWindowChanges wc = { ev->x, ev->y, ev->width, ev->height, ev->border_width, ev->above, ev->detail }; + XConfigureWindow(dis, ev->window, ev->value_mask, &wc); + XSync(dis, False); + tile(&desktops[currdeskidx]); } /* close the window */ -- cgit v1.3.1