about summary refs log tree commit diff stats
path: root/event.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-08-29 17:31:55 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-08-29 17:31:55 +0200
commitaa1bda81646e9d6188fd584009be0eee619f6966 (patch)
tree28ad2d6e4d602b738a154d6befc62bfef9107819 /event.c
parent157ea539a2d1926ee3a9d2fe713eba0b9428f685 (diff)
downloaddwm-aa1bda81646e9d6188fd584009be0eee619f6966.tar.gz
configurenotify remembers max geom now, and restores this if necessary, however it accepts to touch the max size on configurerequest, this shouldn't break fillscreen apps (tested with mplayer)
Diffstat (limited to 'event.c')
-rw-r--r--event.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/event.c b/event.c
index c7a0b15..0f74478 100644
--- a/event.c
+++ b/event.c
@@ -150,6 +150,7 @@ buttonpress(XEvent *e)
 static void
 configurerequest(XEvent *e)
 {
+	int ox, oy, ow, oh;
 	unsigned long newmask;
 	Client *c;
 	XConfigureRequestEvent *ev = &e->xconfigurerequest;
@@ -157,6 +158,10 @@ configurerequest(XEvent *e)
 	XWindowChanges wc;
 
 	if((c = getclient(ev->window))) {
+		ox = c->x;
+		oy = c->y;
+		ow = c->w;
+		oh = c->h;
 		gravitate(c, True);
 		if(ev->value_mask & CWX)
 			c->x = ev->x;
@@ -191,8 +196,13 @@ configurerequest(XEvent *e)
 			XSendEvent(dpy, c->win, True, NoEventMask, &synev);
 		}
 		XSync(dpy, False);
-		if(c->isfloat)
+		if(c->isfloat || c->ismax) {
 			resize(c, False, TopLeft);
+			c->x = ox;
+			c->y = oy;
+			c->w = ow;
+			c->h = oh;
+		}
 		else
 			arrange(NULL);
 	}