1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 15:12:32 +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:
Christophe CURIS
2014-05-17 16:43:23 +02:00
committed by Carlos R. Mafra
parent 39181154ab
commit 904e8d2be4

View File

@@ -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;
}