slight change of event handling order
parent
bcb07de750
commit
67bc08d1b9
12
event.c
12
event.c
|
@ -37,6 +37,9 @@ movemouse(Client *c) {
|
||||||
for(;;) {
|
for(;;) {
|
||||||
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
|
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
|
||||||
switch (ev.type) {
|
switch (ev.type) {
|
||||||
|
case ButtonRelease:
|
||||||
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
|
return;
|
||||||
case Expose:
|
case Expose:
|
||||||
handler[Expose](&ev);
|
handler[Expose](&ev);
|
||||||
break;
|
break;
|
||||||
|
@ -46,9 +49,6 @@ movemouse(Client *c) {
|
||||||
c->y = ocy + (ev.xmotion.y - y1);
|
c->y = ocy + (ev.xmotion.y - y1);
|
||||||
resize(c, False, TopLeft);
|
resize(c, False, TopLeft);
|
||||||
break;
|
break;
|
||||||
case ButtonRelease:
|
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,9 @@ resizemouse(Client *c) {
|
||||||
for(;;) {
|
for(;;) {
|
||||||
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
|
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
|
||||||
switch(ev.type) {
|
switch(ev.type) {
|
||||||
|
case ButtonRelease:
|
||||||
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
|
return;
|
||||||
case Expose:
|
case Expose:
|
||||||
handler[Expose](&ev);
|
handler[Expose](&ev);
|
||||||
break;
|
break;
|
||||||
|
@ -87,9 +90,6 @@ resizemouse(Client *c) {
|
||||||
sticky = (ocy <= ev.xmotion.y) ? TopRight : BotRight;
|
sticky = (ocy <= ev.xmotion.y) ? TopRight : BotRight;
|
||||||
resize(c, True, sticky);
|
resize(c, True, sticky);
|
||||||
break;
|
break;
|
||||||
case ButtonRelease:
|
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue