[gtk3/f19] Fix assertions during scrolling
Matthias Clasen
mclasen at fedoraproject.org
Thu Dec 5 03:16:23 UTC 2013
commit dab1bdbe60019a5d43bbdbeee7ceff96116fa017
Author: Matthias Clasen <mclasen at redhat.com>
Date: Wed Dec 4 22:16:08 2013 -0500
Fix assertions during scrolling
...le-all-XI2-crossing-mode-values-in-switch.patch | 41 +++++++++++++++
...XINotifyPassiveGrab-Ungrab-in-focus-event.patch | 55 ++++++++++++++++++++
gtk3.spec | 9 +++
3 files changed, 105 insertions(+), 0 deletions(-)
---
diff --git a/0001-x11-Handle-all-XI2-crossing-mode-values-in-switch.patch b/0001-x11-Handle-all-XI2-crossing-mode-values-in-switch.patch
new file mode 100644
index 0000000..bfcb2af
--- /dev/null
+++ b/0001-x11-Handle-all-XI2-crossing-mode-values-in-switch.patch
@@ -0,0 +1,41 @@
+From 860d9870019ea49de1485940001a485953658145 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg at gnome.org>
+Date: Wed, 4 Dec 2013 12:34:31 +0100
+Subject: [PATCH 1/2] x11: Handle all XI2 crossing mode values in switch
+
+This fixes potential assertions if a GTK+ app gets to receive
+a XINotifyPassiveGrab/Ungrab pointer crossing event, currently
+triggerable by XIGrabEnter passive grabs.
+
+http://bugzilla.gnome.org/show_bug.cgi?id=719762
+---
+ gdk/x11/gdkdevicemanager-xi2.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
+index fa02b65..c0368bf 100644
+--- a/gdk/x11/gdkdevicemanager-xi2.c
++++ b/gdk/x11/gdkdevicemanager-xi2.c
+@@ -780,12 +780,16 @@ translate_crossing_mode (gint mode)
+ {
+ switch (mode)
+ {
+- case NotifyNormal:
++ case XINotifyNormal:
+ return GDK_CROSSING_NORMAL;
+- case NotifyGrab:
++ case XINotifyGrab:
++ case XINotifyPassiveGrab:
+ return GDK_CROSSING_GRAB;
+- case NotifyUngrab:
++ case XINotifyUngrab:
++ case XINotifyPassiveUngrab:
+ return GDK_CROSSING_UNGRAB;
++ case XINotifyWhileGrabbed:
++ /* Fall through, unexpected in pointer crossing events */
+ default:
+ g_assert_not_reached ();
+ }
+--
+1.8.4.2
+
diff --git a/0002-x11-Handle-XINotifyPassiveGrab-Ungrab-in-focus-event.patch b/0002-x11-Handle-XINotifyPassiveGrab-Ungrab-in-focus-event.patch
new file mode 100644
index 0000000..a21ad0e
--- /dev/null
+++ b/0002-x11-Handle-XINotifyPassiveGrab-Ungrab-in-focus-event.patch
@@ -0,0 +1,55 @@
+From 26fa630c65656f2057bcb2865f91559be3746595 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg at gnome.org>
+Date: Wed, 4 Dec 2013 12:49:02 +0100
+Subject: [PATCH 2/2] 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
+---
+ gdk/x11/gdkdevicemanager-core-x11.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
+index 0e49fb7..fa6baa2 100644
+--- a/gdk/x11/gdkdevicemanager-core-x11.c
++++ b/gdk/x11/gdkdevicemanager-core-x11.c
+@@ -838,6 +838,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;
+
+@@ -845,6 +849,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
+@@ -860,6 +868,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;
+--
+1.8.4.2
+
diff --git a/gtk3.spec b/gtk3.spec
index 104646b..e3f796c 100644
--- a/gtk3.spec
+++ b/gtk3.spec
@@ -22,6 +22,10 @@ URL: http://www.gtk.org
#VCS: git:git://git.gnome.org/gtk+
Source: http://download.gnome.org/sources/gtk+/3.8/gtk+-%{version}.tar.xz
+# upstream fixes
+Patch1: 0001-x11-Handle-all-XI2-crossing-mode-values-in-switch.patch
+Patch2: 0002-x11-Handle-XINotifyPassiveGrab-Ungrab-in-focus-event.patch
+
BuildRequires: gnome-common autoconf automake intltool gettext
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: at-spi2-atk-devel
@@ -121,6 +125,8 @@ widget toolkit.
%prep
%setup -q -n gtk+-%{version}
+%patch1 -p1
+%patch2 -p1
%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
@@ -266,6 +272,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache
%{_datadir}/gtk-doc
%changelog
+* Wed Dec 4 2013 Matthias Clasen <mclasen at redhat.com> - 3.8.8-2
+- Add some upstream scrolling fixes
+
* Tue Nov 26 2013 Matthias Clasen <mclasen at redhat.com> - 3.8.8-1
- Update to 3.8.8
More information about the scm-commits
mailing list