comparison 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
comparison
equal deleted inserted replaced
19:b5510d0c6d43 20:4560e0882c1d
77 Client *c; 77 Client *c;
78 78
79 ev->value_mask &= ~CWSibling; 79 ev->value_mask &= ~CWSibling;
80 if((c = getclient(ev->window))) { 80 if((c = getclient(ev->window))) {
81 if(ev->value_mask & CWX) 81 if(ev->value_mask & CWX)
82 c->r[RFloat].x = ev->x; 82 c->x = ev->x;
83 if(ev->value_mask & CWY) 83 if(ev->value_mask & CWY)
84 c->r[RFloat].y = ev->y; 84 c->y = ev->y;
85 if(ev->value_mask & CWWidth) 85 if(ev->value_mask & CWWidth)
86 c->r[RFloat].width = ev->width; 86 c->w = ev->width;
87 if(ev->value_mask & CWHeight) 87 if(ev->value_mask & CWHeight)
88 c->r[RFloat].height = ev->height; 88 c->h = ev->height;
89 } 89 }
90 90
91 wc.x = ev->x; 91 wc.x = ev->x;
92 wc.y = ev->y; 92 wc.y = ev->y;
93 wc.width = ev->width; 93 wc.width = ev->width;
177 177
178 static void 178 static void
179 propertynotify(XEvent *e) 179 propertynotify(XEvent *e)
180 { 180 {
181 XPropertyEvent *ev = &e->xproperty; 181 XPropertyEvent *ev = &e->xproperty;
182 long msize;
183 Client *c; 182 Client *c;
184 183
185 if(ev->state == PropertyDelete) 184 if(ev->state == PropertyDelete)
186 return; /* ignore */ 185 return; /* ignore */
187 186
193 switch (ev->atom) { 192 switch (ev->atom) {
194 default: break; 193 default: break;
195 case XA_WM_TRANSIENT_FOR: 194 case XA_WM_TRANSIENT_FOR:
196 XGetTransientForHint(dpy, c->win, &c->trans); 195 XGetTransientForHint(dpy, c->win, &c->trans);
197 break; 196 break;
197 update_size(c);
198 case XA_WM_NORMAL_HINTS: 198 case XA_WM_NORMAL_HINTS:
199 if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize) 199 update_size(c);
200 || !c->size.flags)
201 c->size.flags = PSize;
202 if(c->size.flags & PMinSize && c->size.flags & PMaxSize
203 && c->size.min_width == c->size.max_width
204 && c->size.min_height == c->size.max_height)
205 c->fixedsize = True;
206 else
207 c->fixedsize = False;
208 break; 200 break;
209 } 201 }
210 if(ev->atom == XA_WM_NAME || ev->atom == net_atom[NetWMName]) { 202 if(ev->atom == XA_WM_NAME || ev->atom == net_atom[NetWMName]) {
211 update_name(c); 203 update_name(c);
212 } 204 }