aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-05 17:49:59 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-05 17:49:59 +0200
commitc4b27633d315f324dd4f11458589a5b5f75f372e (patch)
tree3c03bb280e6c4d5d4972641ca238d2f8349e9a83 /monsterwm.c
parentd18f17b8c94d882b25af1e9cb8394ecf182b7ecd (diff)
rework configurerequest() function
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 0fd6379..1299337 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -225,21 +225,20 @@ void clientmessage(XEvent *e) {
void configurerequest(XEvent *e) {
client *c = wintoclient(e->xconfigurerequest.window);
- if (c && c->isfullscreen) {
+ if (c && c->isfullscreen)
XMoveResizeWindow(dis, c->win, 0, 0, ww + BORDER_WIDTH, wh + BORDER_WIDTH + PANEL_HEIGHT);
- return;
+ else {
+ XWindowChanges wc;
+ wc.x = e->xconfigurerequest.x;
+ wc.y = e->xconfigurerequest.y + (showpanel && TOP_PANEL) ? PANEL_HEIGHT : 0;
+ wc.width = (e->xconfigurerequest.width < ww - BORDER_WIDTH) ? e->xconfigurerequest.width : ww + BORDER_WIDTH;
+ wc.height = (e->xconfigurerequest.height < wh - BORDER_WIDTH) ? e->xconfigurerequest.height : wh + BORDER_WIDTH;
+ wc.border_width = e->xconfigurerequest.border_width;
+ wc.sibling = e->xconfigurerequest.above;
+ wc.stack_mode = e->xconfigurerequest.detail;
+ XConfigureWindow(dis, e->xconfigurerequest.window, e->xconfigurerequest.value_mask, &wc);
+ XSync(dis, False);
}
-
- XWindowChanges wc;
- wc.x = e->xconfigurerequest.x;
- wc.y = e->xconfigurerequest.y + (showpanel && TOP_PANEL) ? PANEL_HEIGHT : 0;
- wc.width = (e->xconfigurerequest.width < ww - BORDER_WIDTH) ? e->xconfigurerequest.width : ww + BORDER_WIDTH;
- wc.height = (e->xconfigurerequest.height < wh - BORDER_WIDTH) ? e->xconfigurerequest.height : wh + BORDER_WIDTH;
- wc.border_width = e->xconfigurerequest.border_width;
- wc.sibling = e->xconfigurerequest.above;
- wc.stack_mode = e->xconfigurerequest.detail;
- XConfigureWindow(dis, e->xconfigurerequest.window, e->xconfigurerequest.value_mask, &wc);
- XSync(dis, False);
tile();
}