aewl

diff event.c @ 20:4560e0882c1d

made code more readable
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 22:49:09 +0200
parents b5510d0c6d43
children 3ef108a5ca0a
line diff
     1.1 --- a/event.c	Tue Jul 11 21:41:49 2006 +0200
     1.2 +++ b/event.c	Tue Jul 11 22:49:09 2006 +0200
     1.3 @@ -79,13 +79,13 @@
     1.4  	ev->value_mask &= ~CWSibling;
     1.5  	if((c = getclient(ev->window))) {
     1.6  		if(ev->value_mask & CWX)
     1.7 -			c->r[RFloat].x = ev->x;
     1.8 +			c->x = ev->x;
     1.9  		if(ev->value_mask & CWY)
    1.10 -			c->r[RFloat].y = ev->y;
    1.11 +			c->y = ev->y;
    1.12  		if(ev->value_mask & CWWidth)
    1.13 -			c->r[RFloat].width = ev->width;
    1.14 +			c->w = ev->width;
    1.15  		if(ev->value_mask & CWHeight)
    1.16 -			c->r[RFloat].height = ev->height;
    1.17 +			c->h = ev->height;
    1.18  	}
    1.19  
    1.20  	wc.x = ev->x;
    1.21 @@ -179,7 +179,6 @@
    1.22  propertynotify(XEvent *e)
    1.23  {
    1.24  	XPropertyEvent *ev = &e->xproperty;
    1.25 -	long msize;
    1.26  	Client *c;
    1.27  
    1.28  	if(ev->state == PropertyDelete)
    1.29 @@ -195,16 +194,9 @@
    1.30  			case XA_WM_TRANSIENT_FOR:
    1.31  				XGetTransientForHint(dpy, c->win, &c->trans);
    1.32  				break;
    1.33 +				update_size(c);
    1.34  			case XA_WM_NORMAL_HINTS:
    1.35 -				if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize)
    1.36 -						|| !c->size.flags)
    1.37 -					c->size.flags = PSize;
    1.38 -				if(c->size.flags & PMinSize && c->size.flags & PMaxSize
    1.39 -						&& c->size.min_width == c->size.max_width
    1.40 -						&& c->size.min_height == c->size.max_height)
    1.41 -					c->fixedsize = True;
    1.42 -				else
    1.43 -					c->fixedsize = False;
    1.44 +				update_size(c);
    1.45  				break;
    1.46  		}
    1.47  		if(ev->atom == XA_WM_NAME || ev->atom == net_atom[NetWMName]) {