mirror of
git://git.suckless.org/dwm
synced 2024-12-16 20:25:01 +00:00
ismax toggling on mouse based action
This commit is contained in:
parent
67986e81ee
commit
da909dd1e8
2
event.c
2
event.c
@ -49,6 +49,7 @@ movemouse(Client *c) {
|
|||||||
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||||
None, cursor[CurMove], CurrentTime) != GrabSuccess)
|
None, cursor[CurMove], CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
|
c->ismax = False;
|
||||||
XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui);
|
XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui);
|
||||||
for(;;) {
|
for(;;) {
|
||||||
XMaskEvent(dpy, MOUSEMASK | ExposureMask | StructureNotifyMask, &ev);
|
XMaskEvent(dpy, MOUSEMASK | ExposureMask | StructureNotifyMask, &ev);
|
||||||
@ -92,6 +93,7 @@ resizemouse(Client *c) {
|
|||||||
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||||
None, cursor[CurResize], CurrentTime) != GrabSuccess)
|
None, cursor[CurResize], CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
|
c->ismax = False;
|
||||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h);
|
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h);
|
||||||
for(;;) {
|
for(;;) {
|
||||||
XMaskEvent(dpy, MOUSEMASK | ExposureMask | StructureNotifyMask, &ev);
|
XMaskEvent(dpy, MOUSEMASK | ExposureMask | StructureNotifyMask, &ev);
|
||||||
|
Loading…
Reference in New Issue
Block a user