summaryrefslogtreecommitdiff
path: root/0001-x11-Avoid-setting-has_pointer_focus-if-a-EWMH-compli.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-x11-Avoid-setting-has_pointer_focus-if-a-EWMH-compli.patch')
-rw-r--r--0001-x11-Avoid-setting-has_pointer_focus-if-a-EWMH-compli.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/0001-x11-Avoid-setting-has_pointer_focus-if-a-EWMH-compli.patch b/0001-x11-Avoid-setting-has_pointer_focus-if-a-EWMH-compli.patch
new file mode 100644
index 0000000..ac7a7e2
--- /dev/null
+++ b/0001-x11-Avoid-setting-has_pointer_focus-if-a-EWMH-compli.patch
@@ -0,0 +1,45 @@
+From 5b395e7bb44651f57246e9dcc78d6e1bd373f6a6 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg@gnome.org>
+Date: Fri, 13 Jun 2014 14:38:03 +0200
+Subject: [PATCH] x11: Avoid setting has_pointer_focus if a EWMH compliant WM
+ is present
+
+This is mostly useful to have focus behave sanely on lack of WM, so avoid
+any check there if we're positive there is a WM handling focus.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=677329
+---
+ gdk/x11/gdkdevicemanager-core-x11.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
+index 8d6848869e0d..c4aac3f4dee9 100644
+--- a/gdk/x11/gdkdevicemanager-core-x11.c
++++ b/gdk/x11/gdkdevicemanager-core-x11.c
+@@ -820,6 +820,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
+ int mode)
+ {
+ GdkToplevelX11 *toplevel;
++ GdkX11Screen *x11_screen;
+ gboolean had_focus;
+
+ g_return_if_fail (GDK_IS_WINDOW (window));
+@@ -880,11 +881,14 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
+ toplevel->has_focus = (focus_in) ? TRUE : FALSE;
+ break;
+ case NotifyPointer:
++ x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
++
+ /* The X server sends NotifyPointer/NotifyGrab,
+ * but the pointer focus is ignored while a
+ * grab is in effect
+ */
+- if (mode != NotifyGrab &&
++ if (!x11_screen->wmspec_check_window &&
++ mode != NotifyGrab &&
+ #ifdef XINPUT_2
+ mode != XINotifyPassiveGrab &&
+ mode != XINotifyPassiveUngrab &&
+--
+2.5.0
+
bgstack15