slight change of event handling order
arg@mmvi unknown
Mon, 25 Sep 2006 21:28:00 +0200
1 files changed,
6 insertions(+),
6 deletions(-)
jump to
M
event.c
→
event.c
@@ -37,6 +37,9 @@ XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui);
for(;;) { XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); switch (ev.type) { + case ButtonRelease: + XUngrabPointer(dpy, CurrentTime); + return; case Expose: handler[Expose](&ev); break;@@ -46,9 +49,6 @@ c->x = ocx + (ev.xmotion.x - x1);
c->y = ocy + (ev.xmotion.y - y1); resize(c, False, TopLeft); break; - case ButtonRelease: - XUngrabPointer(dpy, CurrentTime); - return; } } }@@ -70,6 +70,9 @@ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h);
for(;;) { XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); switch(ev.type) { + case ButtonRelease: + XUngrabPointer(dpy, CurrentTime); + return; case Expose: handler[Expose](&ev); break;@@ -87,9 +90,6 @@ else
sticky = (ocy <= ev.xmotion.y) ? TopRight : BotRight; resize(c, True, sticky); break; - case ButtonRelease: - XUngrabPointer(dpy, CurrentTime); - return; } } }