dwm-meillo

diff event.c @ 384:126e78129f1d

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)
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 29 Aug 2006 17:31:55 +0200
parents a9b4077ec058
children 37706ba7d492
line diff
     1.1 --- a/event.c	Tue Aug 29 17:11:37 2006 +0200
     1.2 +++ b/event.c	Tue Aug 29 17:31:55 2006 +0200
     1.3 @@ -150,6 +150,7 @@
     1.4  static void
     1.5  configurerequest(XEvent *e)
     1.6  {
     1.7 +	int ox, oy, ow, oh;
     1.8  	unsigned long newmask;
     1.9  	Client *c;
    1.10  	XConfigureRequestEvent *ev = &e->xconfigurerequest;
    1.11 @@ -157,6 +158,10 @@
    1.12  	XWindowChanges wc;
    1.13  
    1.14  	if((c = getclient(ev->window))) {
    1.15 +		ox = c->x;
    1.16 +		oy = c->y;
    1.17 +		ow = c->w;
    1.18 +		oh = c->h;
    1.19  		gravitate(c, True);
    1.20  		if(ev->value_mask & CWX)
    1.21  			c->x = ev->x;
    1.22 @@ -191,8 +196,13 @@
    1.23  			XSendEvent(dpy, c->win, True, NoEventMask, &synev);
    1.24  		}
    1.25  		XSync(dpy, False);
    1.26 -		if(c->isfloat)
    1.27 +		if(c->isfloat || c->ismax) {
    1.28  			resize(c, False, TopLeft);
    1.29 +			c->x = ox;
    1.30 +			c->y = oy;
    1.31 +			c->w = ow;
    1.32 +			c->h = oh;
    1.33 +		}
    1.34  		else
    1.35  			arrange(NULL);
    1.36  	}