diff options
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -53,6 +53,8 @@ struct action_lookup ac_lookup_table[] = { { "scrollend", a_scrollend}, { "grabkeys", a_grabkeys}, { "ungrabkeys", a_ungrabkeys}, + { "grabmouse", a_grabmouse}, + { "ungrabmouse", a_ungrabmouse}, { 0, 0 } }; @@ -526,3 +528,18 @@ a_ungrabkeys(char * opt[]) { return 0; } +int +a_grabmouse(char * opt[]) { + (void)opt; + XGrabPointer(dzen.dpy, RootWindow(dzen.dpy, dzen.screen), + True, ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime); + return 0; +} + +int +a_ungrabmouse(char * opt[]) { + (void)opt; + XUngrabPointer(dzen.dpy, CurrentTime); + return 0; +} + |