diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-04-22 00:35:36 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-04-22 00:35:36 +0000 |
| commit | 854b2ae68498133f3119ec614b725025af3fd66b (patch) | |
| tree | 97ec11c755b940dbd33d95c2f06f119ff50e3a7e | |
| parent | 8644a47cb76a8188b39ce4c86deb96cd063e8dc4 (diff) | |
grab enter/leave events during mouse grabs and pass events along still during the grab. this is needed to catch enter/leave events in the menus. it seems to not be weird with apps.
| -rw-r--r-- | openbox/grab.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/openbox/grab.c b/openbox/grab.c index e92722a6..a8a6200e 100644 --- a/openbox/grab.c +++ b/openbox/grab.c @@ -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; |
