dwm-meillo
diff event.c @ 491:12395ef46d97
added configure(), but this doesn't really fix those frking broken SDL apps
author | arg@mmvi |
---|---|
date | Tue, 26 Sep 2006 07:40:19 +0200 |
parents | 303d3384720e |
children | 5df494262dfd |
line diff
1.1 --- a/event.c Mon Sep 25 21:28:00 2006 +0200 1.2 +++ b/event.c Tue Sep 26 07:40:19 2006 +0200 1.3 @@ -1,3 +1,4 @@ 1.4 +#include <stdio.h> 1.5 /* 1.6 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> 1.7 * See LICENSE file for license details. 1.8 @@ -38,6 +39,7 @@ 1.9 XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); 1.10 switch (ev.type) { 1.11 case ButtonRelease: 1.12 + resize(c, True, TopLeft); 1.13 XUngrabPointer(dpy, CurrentTime); 1.14 return; 1.15 case Expose: 1.16 @@ -71,6 +73,7 @@ 1.17 XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); 1.18 switch(ev.type) { 1.19 case ButtonRelease: 1.20 + resize(c, True, TopLeft); 1.21 XUngrabPointer(dpy, CurrentTime); 1.22 return; 1.23 case Expose: 1.24 @@ -151,6 +154,7 @@ 1.25 XEvent synev; 1.26 XWindowChanges wc; 1.27 1.28 + fputs("configurerequest\n", stderr); 1.29 if((c = getclient(ev->window))) { 1.30 c->ismax = False; 1.31 gravitate(c, True); 1.32 @@ -172,19 +176,8 @@ 1.33 newmask = ev->value_mask & (~(CWSibling | CWStackMode | CWBorderWidth)); 1.34 if(newmask) 1.35 XConfigureWindow(dpy, c->win, newmask, &wc); 1.36 - else { 1.37 - synev.type = ConfigureNotify; 1.38 - synev.xconfigure.display = dpy; 1.39 - synev.xconfigure.event = c->win; 1.40 - synev.xconfigure.window = c->win; 1.41 - synev.xconfigure.x = c->x; 1.42 - synev.xconfigure.y = c->y; 1.43 - synev.xconfigure.width = c->w; 1.44 - synev.xconfigure.height = c->h; 1.45 - synev.xconfigure.border_width = c->border; 1.46 - synev.xconfigure.above = None; 1.47 - XSendEvent(dpy, c->win, True, NoEventMask, &synev); 1.48 - } 1.49 + else 1.50 + configure(c); 1.51 XSync(dpy, False); 1.52 if(c->isfloat) 1.53 resize(c, False, TopLeft); 1.54 @@ -218,6 +211,7 @@ 1.55 Client *c; 1.56 XCrossingEvent *ev = &e->xcrossing; 1.57 1.58 + fputs("enternotify\n", stderr); 1.59 if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) 1.60 return; 1.61 1.62 @@ -305,6 +299,7 @@ 1.63 Window trans; 1.64 XPropertyEvent *ev = &e->xproperty; 1.65 1.66 + fputs("propertynotify\n", stderr); 1.67 if(ev->state == PropertyDelete) 1.68 return; /* ignore */ 1.69