]> Dogcows Code - chaz/openbox/commitdiff
use CurrentTime again?
authorDana Jansens <danakj@orodu.net>
Wed, 26 Mar 2003 14:39:14 +0000 (14:39 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 26 Mar 2003 14:39:14 +0000 (14:39 +0000)
openbox/grab.c
plugins/keyboard/keyboard.c

index 0f21a40f5bbffef059bb1c2203c6751509593cb2..ab38f27b826f83192fd81169b6e31a21a4abb709 100644 (file)
@@ -17,7 +17,7 @@ void grab_keyboard(gboolean grab)
         if (kgrabs++ == 0) {
             g_message("GRABBING KEYBOARD %d", kgrabs);
             XGrabKeyboard(ob_display, ob_root, 0, GrabModeAsync, GrabModeSync,
-                          event_lasttime);
+                          CurrentTime);
         } else
             g_message("NOT GRABBING KEYBOARD %d", kgrabs);
     } else if (kgrabs > 0) {
@@ -34,7 +34,7 @@ void grab_pointer(gboolean grab, Cursor cur)
     if (grab) {
         if (pgrabs++ == 0)
             XGrabPointer(ob_display, ob_root, False, 0, GrabModeAsync,
-                         GrabModeAsync, FALSE, cur, event_lasttime);
+                         GrabModeAsync, FALSE, cur, CurrentTime);
     } else if (pgrabs > 0) {
         if (--pgrabs == 0)
             XUngrabPointer(ob_display, CurrentTime);
index cf48b2e9290bf53edb062ec3d599c18c966b7eac..22ea5556bcb4b2580a2dd739ab32f54b6e667c61 100644 (file)
@@ -6,6 +6,7 @@
 #include "tree.h"
 #include "keyboard.h"
 #include "keysrc.h"
+#include "translate.h"
 #include <glib.h>
 
 void plugin_setup_config()
@@ -38,7 +39,8 @@ static void reset_chains()
     if (grabbed) {
        grabbed = FALSE;
         grab_keyboard(FALSE);
-    }
+    } else
+        XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
 }
 
 gboolean kbind(GList *keylist, Action *action)
@@ -100,6 +102,7 @@ static void press(ObEvent *e, void *foo)
                     if (!grabbed) {
                         grab_keyboard(TRUE);
                         grabbed = TRUE;
+                        XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
                     }
                     curpos = p;
                 } else {
@@ -119,7 +122,6 @@ static void press(ObEvent *e, void *foo)
             p = p->next_sibling;
         }
     }
-    XAllowEvents(ob_display, AsyncKeyboard, e->data.x.e->xkey.time);
 }
 
 void plugin_startup()
This page took 0.025841 seconds and 4 git commands to generate.