aboutsummaryrefslogtreecommitdiff
path: root/src/dminiwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dminiwm.c')
-rwxr-xr-xsrc/dminiwm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dminiwm.c b/src/dminiwm.c
index 7a5b0e4..93a7c67 100755
--- a/src/dminiwm.c
+++ b/src/dminiwm.c
@@ -640,8 +640,14 @@ void configurerequest(XEvent *e) {
XWindowChanges wc;
wc.x = ev->x;
wc.y = ev->y;
- wc.width = ev->width;
- wc.height = ev->height;
+ if(ev->width < sw)
+ wc.width = ev->width;
+ else
+ wc.width = sw - BORDER_WIDTH;
+ if(ev->height < sh)
+ wc.height = ev->height;
+ else
+ wc.height = sh - BORDER_WIDTH;
wc.border_width = ev->border_width;
wc.sibling = ev->above;
wc.stack_mode = ev->detail;