mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-06 09:20:34 +02: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:
1 parent
39181154ab
commit
904e8d2be4
1 file changed
+7
-6
+7
-6
@@ -1721,16 +1721,17 @@ static void handleKeyPress(XEvent * event)
|
||||
|
||||
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) {
|
||||
XGrabPointer(dpy, scr->root_win, True, 0,
|
||||
GrabModeAsync, GrabModeAsync, None, wPreferences.cursor[WCUR_WAIT], CurrentTime);
|
||||
XSync(dpy, False);
|
||||
|
||||
ExecuteShellCommand(scr, cmdline);
|
||||
wfree(cmdline);
|
||||
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
XSync(dpy, False);
|
||||
}
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
XSync(dpy, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user