diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2013-12-04 12:49:02 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-12-04 21:22:23 -0500 |
commit | f6c9a33841ae613ebbbff074e832bcbe15beea9f (patch) | |
tree | 68f3cbad0bc0f843aaa6d233a1f0e0a52c4d7db9 /gdk/x11 | |
parent | 3dbabbd2e5340857d0223f0529d4feb1bbacd3fd (diff) | |
download | gtk+-f6c9a33841ae613ebbbff074e832bcbe15beea9f.tar.gz |
x11: Handle XINotifyPassiveGrab/Ungrab in focus events
The focus handling code is shared between core and XI2 implementations,
so just handle the extra XI2 types for passive grabs. Those must be dealt
with in the same way than active grabs. Focus events with this crossing
mode could happen currently through the XIGrabFocusIn passive grab.
https://bugzilla.gnome.org/show_bug.cgi?id=719762
Diffstat (limited to 'gdk/x11')
-rw-r--r-- | gdk/x11/gdkdevicemanager-core-x11.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c index 96114895ca..db5543b7b7 100644 --- a/gdk/x11/gdkdevicemanager-core-x11.c +++ b/gdk/x11/gdkdevicemanager-core-x11.c @@ -842,6 +842,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window, */ if (toplevel->has_pointer && mode != NotifyGrab && +#ifdef XINPUT_2 + mode != XINotifyPassiveGrab && + mode != XINotifyPassiveUngrab && +#endif /* XINPUT_2 */ mode != NotifyUngrab) toplevel->has_pointer_focus = (focus_in) ? FALSE : TRUE; @@ -849,6 +853,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window, case NotifyNonlinear: case NotifyNonlinearVirtual: if (mode != NotifyGrab && +#ifdef XINPUT_2 + mode != XINotifyPassiveGrab && + mode != XINotifyPassiveUngrab && +#endif /* XINPUT_2 */ mode != NotifyUngrab) toplevel->has_focus_window = (focus_in) ? TRUE : FALSE; /* We pretend that the focus moves to the grab @@ -864,6 +872,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window, * grab is in effect */ if (mode != NotifyGrab && +#ifdef XINPUT_2 + mode != XINotifyPassiveGrab && + mode != XINotifyPassiveUngrab && +#endif /* XINPUT_2 */ mode != NotifyUngrab) toplevel->has_pointer_focus = (focus_in) ? TRUE : FALSE; break; |