|
|
8d4952 |
From 26fa630c65656f2057bcb2865f91559be3746595 Mon Sep 17 00:00:00 2001
|
|
|
8d4952 |
From: Carlos Garnacho <carlosg@gnome.org>
|
|
|
8d4952 |
Date: Wed, 4 Dec 2013 12:49:02 +0100
|
|
|
8d4952 |
Subject: [PATCH 2/2] x11: Handle XINotifyPassiveGrab/Ungrab in focus events
|
|
|
8d4952 |
|
|
|
8d4952 |
The focus handling code is shared between core and XI2 implementations,
|
|
|
8d4952 |
so just handle the extra XI2 types for passive grabs. Those must be dealt
|
|
|
8d4952 |
with in the same way than active grabs. Focus events with this crossing
|
|
|
8d4952 |
mode could happen currently through the XIGrabFocusIn passive grab.
|
|
|
8d4952 |
|
|
|
8d4952 |
https://bugzilla.gnome.org/show_bug.cgi?id=719762
|
|
|
8d4952 |
---
|
|
|
8d4952 |
gdk/x11/gdkdevicemanager-core-x11.c | 12 ++++++++++++
|
|
|
8d4952 |
1 file changed, 12 insertions(+)
|
|
|
8d4952 |
|
|
|
8d4952 |
diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
|
|
|
8d4952 |
index 0e49fb7..fa6baa2 100644
|
|
|
8d4952 |
--- a/gdk/x11/gdkdevicemanager-core-x11.c
|
|
|
8d4952 |
+++ b/gdk/x11/gdkdevicemanager-core-x11.c
|
|
|
8d4952 |
@@ -838,6 +838,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
|
|
8d4952 |
*/
|
|
|
8d4952 |
if (toplevel->has_pointer &&
|
|
|
8d4952 |
mode != NotifyGrab &&
|
|
|
8d4952 |
+#ifdef XINPUT_2
|
|
|
8d4952 |
+ mode != XINotifyPassiveGrab &&
|
|
|
8d4952 |
+ mode != XINotifyPassiveUngrab &&
|
|
|
8d4952 |
+#endif /* XINPUT_2 */
|
|
|
8d4952 |
mode != NotifyUngrab)
|
|
|
8d4952 |
toplevel->has_pointer_focus = (focus_in) ? FALSE : TRUE;
|
|
|
8d4952 |
|
|
|
8d4952 |
@@ -845,6 +849,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
|
|
8d4952 |
case NotifyNonlinear:
|
|
|
8d4952 |
case NotifyNonlinearVirtual:
|
|
|
8d4952 |
if (mode != NotifyGrab &&
|
|
|
8d4952 |
+#ifdef XINPUT_2
|
|
|
8d4952 |
+ mode != XINotifyPassiveGrab &&
|
|
|
8d4952 |
+ mode != XINotifyPassiveUngrab &&
|
|
|
8d4952 |
+#endif /* XINPUT_2 */
|
|
|
8d4952 |
mode != NotifyUngrab)
|
|
|
8d4952 |
toplevel->has_focus_window = (focus_in) ? TRUE : FALSE;
|
|
|
8d4952 |
/* We pretend that the focus moves to the grab
|
|
|
8d4952 |
@@ -860,6 +868,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
|
|
|
8d4952 |
* grab is in effect
|
|
|
8d4952 |
*/
|
|
|
8d4952 |
if (mode != NotifyGrab &&
|
|
|
8d4952 |
+#ifdef XINPUT_2
|
|
|
8d4952 |
+ mode != XINotifyPassiveGrab &&
|
|
|
8d4952 |
+ mode != XINotifyPassiveUngrab &&
|
|
|
8d4952 |
+#endif /* XINPUT_2 */
|
|
|
8d4952 |
mode != NotifyUngrab)
|
|
|
8d4952 |
toplevel->has_pointer_focus = (focus_in) ? TRUE : FALSE;
|
|
|
8d4952 |
break;
|
|
|
8d4952 |
--
|
|
|
8d4952 |
1.8.4.2
|
|
|
8d4952 |
|