]> Dogcows Code - chaz/openbox/commitdiff
grab enter/leave events during mouse grabs and pass events along still during the...
authorDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 00:35:36 +0000 (00:35 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 00:35:36 +0000 (00:35 +0000)
openbox/grab.c

index e92722a6a48e1c0daab0cca054ea9f292bac0fa7..a8a6200efa246b62e12bce1192ac90427789b37d 100644 (file)
@@ -26,7 +26,8 @@
 #include <glib.h>
 #include <X11/Xlib.h>
 
-#define GRAB_PTR_MASK (ButtonPressMask | ButtonReleaseMask | PointerMotionMask)
+#define GRAB_PTR_MASK (ButtonPressMask | ButtonReleaseMask | \
+                       PointerMotionMask | EnterWindowMask | LeaveWindowMask)
 #define GRAB_KEY_MASK (KeyPressMask | KeyReleaseMask)
 
 #define MASK_LIST_SIZE 8
@@ -96,7 +97,7 @@ gboolean grab_pointer(gboolean grab, ObCursor cur)
     if (grab) {
         if (pgrabs++ == 0) {
             ret = XGrabPointer(ob_display, screen_support_win,
-                               False, GRAB_PTR_MASK, GrabModeAsync,
+                               True, GRAB_PTR_MASK, GrabModeAsync,
                                GrabModeAsync, None,
                                ob_cursor(cur), event_curtime) == Success;
             if (!ret)
@@ -120,7 +121,7 @@ gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win)
 
     if (grab) {
         if (pgrabs++ == 0) {
-            ret = XGrabPointer(ob_display, win, False, GRAB_PTR_MASK,
+            ret = XGrabPointer(ob_display, win, True, GRAB_PTR_MASK,
                                GrabModeAsync, GrabModeAsync, None,
                                ob_cursor(cur),
                                event_curtime) == Success;
This page took 0.027657 seconds and 4 git commands to generate.