summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
Diffstat (limited to 'openbox')
-rw-r--r--openbox/grab.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbox/grab.c b/openbox/grab.c
index dd880c5f..f8359df6 100644
--- a/openbox/grab.c
+++ b/openbox/grab.c
@@ -22,6 +22,8 @@ gboolean grab_keyboard(gboolean grab)
if (kgrabs++ == 0)
ret = XGrabKeyboard(ob_display, ob_root, FALSE, GrabModeAsync,
GrabModeAsync, event_lasttime) == Success;
+ else
+ ret = TRUE;
} else if (kgrabs > 0) {
if (--kgrabs == 0)
XUngrabKeyboard(ob_display, event_lasttime);
@@ -39,6 +41,8 @@ gboolean grab_pointer(gboolean grab, Cursor cur)
ret = XGrabPointer(ob_display, ob_root, False, GRAB_PTR_MASK,
GrabModeAsync, GrabModeAsync, FALSE, cur,
event_lasttime) == Success;
+ else
+ ret = TRUE;
} else if (pgrabs > 0) {
if (--pgrabs == 0)
XUngrabPointer(ob_display, event_lasttime);
@@ -56,6 +60,8 @@ gboolean grab_pointer_window(gboolean grab, Cursor cur, Window win)
ret = XGrabPointer(ob_display, win, False, GRAB_PTR_MASK,
GrabModeAsync, GrabModeAsync, TRUE, cur,
event_lasttime) == Success;
+ else
+ ret = TRUE;
} else if (pgrabs > 0) {
if (--pgrabs == 0)
XUngrabPointer(ob_display, event_lasttime);