From: Christophe CURIS <[email protected]> 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 <[email protected]> --- src/event.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/event.c b/src/event.c index e85de54..49b62e7 100644 --- a/src/event.c +++ b/src/event.c @@ -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, + if (cmdline) { + XGrabPointer(dpy, scr->root_win, True, 0, GrabModeAsync, GrabModeAsync, None, wPreferences.cursor[WCUR_WAIT], CurrentTime); - XSync(dpy, 0); + XSync(dpy, False); - if (cmdline) { ExecuteShellCommand(scr, cmdline); wfree(cmdline); + + XUngrabPointer(dpy, CurrentTime); + XSync(dpy, False); } - XUngrabPointer(dpy, CurrentTime); - XSync(dpy, 0); break; } -- 1.9.2 -- To unsubscribe, send mail to [email protected].
