]> Dogcows Code - chaz/openbox/commitdiff
set ret to true when grabbing and we alerady have it grabbed
authorDana Jansens <danakj@orodu.net>
Thu, 26 Jun 2003 23:31:20 +0000 (23:31 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 26 Jun 2003 23:31:20 +0000 (23:31 +0000)
openbox/grab.c

index dd880c5f37e300d08600cfd6d98d7cd8fbb2822a..f8359df675a5dc3a3f9482fa16543abbd223365f 100644 (file)
@@ -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);
This page took 0.027935 seconds and 4 git commands to generate.