Backport fix for missing focus-in/out events (GNOME #677329)
This commit is contained in:
		
							parent
							
								
									1f8b3950fb
								
							
						
					
					
						commit
						5af8c4a1bd
					
				@ -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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										10
									
								
								gtk3.spec
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								gtk3.spec
									
									
									
									
									
								
							@ -18,7 +18,7 @@
 | 
				
			|||||||
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
 | 
					Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
 | 
				
			||||||
Name: gtk3
 | 
					Name: gtk3
 | 
				
			||||||
Version: 3.19.8
 | 
					Version: 3.19.8
 | 
				
			||||||
Release: 3%{?dist}
 | 
					Release: 4%{?dist}
 | 
				
			||||||
License: LGPLv2+
 | 
					License: LGPLv2+
 | 
				
			||||||
Group: System Environment/Libraries
 | 
					Group: System Environment/Libraries
 | 
				
			||||||
URL: http://www.gtk.org
 | 
					URL: http://www.gtk.org
 | 
				
			||||||
@ -27,6 +27,10 @@ URL: http://www.gtk.org
 | 
				
			|||||||
Source: http://download.gnome.org/sources/gtk+/3.19/gtk+-%{version}.tar.xz
 | 
					Source: http://download.gnome.org/sources/gtk+/3.19/gtk+-%{version}.tar.xz
 | 
				
			||||||
Patch0: fix-leak.patch
 | 
					Patch0: fix-leak.patch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://bugzilla.gnome.org/show_bug.cgi?id=677329
 | 
				
			||||||
 | 
					# https://bugzilla.gnome.org/show_bug.cgi?id=725342
 | 
				
			||||||
 | 
					Patch1: 0001-x11-Avoid-setting-has_pointer_focus-if-a-EWMH-compli.patch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BuildRequires: gnome-common autoconf automake intltool gettext
 | 
					BuildRequires: gnome-common autoconf automake intltool gettext
 | 
				
			||||||
BuildRequires: pkgconfig(atk) >= %{atk_version}
 | 
					BuildRequires: pkgconfig(atk) >= %{atk_version}
 | 
				
			||||||
BuildRequires: pkgconfig(atk-bridge-2.0)
 | 
					BuildRequires: pkgconfig(atk-bridge-2.0)
 | 
				
			||||||
@ -169,6 +173,7 @@ the functionality of the installed %{name} package.
 | 
				
			|||||||
%prep
 | 
					%prep
 | 
				
			||||||
%setup -q -n gtk+-%{version}
 | 
					%setup -q -n gtk+-%{version}
 | 
				
			||||||
%patch0 -p1 -b .fix-leak
 | 
					%patch0 -p1 -b .fix-leak
 | 
				
			||||||
 | 
					%patch1 -p1 -b .focus-in-out
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%build
 | 
					%build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -342,6 +347,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache
 | 
				
			|||||||
%{_datadir}/installed-tests
 | 
					%{_datadir}/installed-tests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%changelog
 | 
					%changelog
 | 
				
			||||||
 | 
					* Mon Feb 08 2016 Debarshi Ray <rishi@fedoraproject.org> - - 3.19.8-4
 | 
				
			||||||
 | 
					- Backport fix for missing focus-in/out events (GNOME #677329)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.8-3
 | 
					* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.8-3
 | 
				
			||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 | 
					- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user