mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-28 17:32:29 +01:00
WMaker: moved XGrab/XUngrabPointer into the conditional code
It is not necessary to call them when the command is not executable. Took opportunity to change parameter to XSync which is supposed to be a 'Bool' type from Xlib, which means either True or False. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
39181154ab
commit
904e8d2be4
13
src/event.c
13
src/event.c
@@ -1721,16 +1721,17 @@ static void handleKeyPress(XEvent * event)
|
|||||||
|
|
||||||
cmdline = ExpandOptions(scr, _("exec %a(Run,Type command to run:)"));
|
cmdline = ExpandOptions(scr, _("exec %a(Run,Type command to run:)"));
|
||||||
|
|
||||||
XGrabPointer(dpy, scr->root_win, True, 0,
|
|
||||||
GrabModeAsync, GrabModeAsync, None, wPreferences.cursor[WCUR_WAIT], CurrentTime);
|
|
||||||
XSync(dpy, 0);
|
|
||||||
|
|
||||||
if (cmdline) {
|
if (cmdline) {
|
||||||
|
XGrabPointer(dpy, scr->root_win, True, 0,
|
||||||
|
GrabModeAsync, GrabModeAsync, None, wPreferences.cursor[WCUR_WAIT], CurrentTime);
|
||||||
|
XSync(dpy, False);
|
||||||
|
|
||||||
ExecuteShellCommand(scr, cmdline);
|
ExecuteShellCommand(scr, cmdline);
|
||||||
wfree(cmdline);
|
wfree(cmdline);
|
||||||
|
|
||||||
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
|
XSync(dpy, False);
|
||||||
}
|
}
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
|
||||||
XSync(dpy, 0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user