summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Williamson <awilliam@redhat.com>2019-10-22 11:56:24 -0700
committerAdam Williamson <awilliam@redhat.com>2019-10-22 11:56:24 -0700
commit3189369c9dabdb08d029d061f8a074736e1b2cfb (patch)
treea14b6adaaebb35417580fbc5c8fcc21355a22ac5
parentBackport PR #1142 to try and fix intermittent copy/cut failures (diff)
downloadgtk3-classic-build-gtk3-3189369c9dabdb08d029d061f8a074736e1b2cfb.tar.gz
gtk3-classic-build-gtk3-3189369c9dabdb08d029d061f8a074736e1b2cfb.tar.bz2
gtk3-classic-build-gtk3-3189369c9dabdb08d029d061f8a074736e1b2cfb.zip
Backport PR #1146 to fix a bug that #1142 introduced
-rw-r--r--1146.patch76
-rw-r--r--gtk3.spec9
2 files changed, 84 insertions, 1 deletions
diff --git a/1146.patch b/1146.patch
new file mode 100644
index 0000000..1f77d26
--- /dev/null
+++ b/1146.patch
@@ -0,0 +1,76 @@
+From ba0a0ce0a0e85d57b3ec2010189b4c8c484c2c9f Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg@gnome.org>
+Date: Tue, 22 Oct 2019 18:36:44 +0200
+Subject: [PATCH 1/2] Revert "gdk: Do not call gdk_selection_owner_set()
+ internally to the backend"
+
+This reverts commit 7a891eeb6def29f6562a3833c272b0cb2a67ae23.
+---
+ gdk/wayland/gdkselection-wayland.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c
+index e14f50de8d..9494489d69 100644
+--- a/gdk/wayland/gdkselection-wayland.c
++++ b/gdk/wayland/gdkselection-wayland.c
+@@ -937,6 +937,7 @@ data_source_cancelled (void *data,
+ gdk_drag_context_cancel (context, GDK_DRAG_CANCEL_ERROR);
+
+ emit_selection_clear (display, atom);
++ gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
+ gdk_wayland_selection_unset_data_source (display, atom);
+ }
+
+@@ -1047,6 +1048,7 @@ primary_source_cancelled (void *data,
+
+ atom = atoms[ATOM_PRIMARY];
+ emit_selection_clear (display, atom);
++ gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
+ gdk_wayland_selection_unset_data_source (display, atom);
+ }
+
+--
+2.22.0
+
+
+From ff41436b594e04e106c0cd3859080ac80e6e6722 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg@gnome.org>
+Date: Tue, 22 Oct 2019 18:39:30 +0200
+Subject: [PATCH 2/2] gdk: Do not change the windowing selection when
+ cancelling source
+
+We are interested in changing the owner window, so the upper bits know
+that it is not this client who owns the selection. We are still not
+interested in unsetting the selection desktop-wide though, so only avoid
+emitting the relevant events then.
+
+The same reasonings than in commit 7a891eeb6def apply otherwise.
+---
+ gdk/wayland/gdkselection-wayland.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c
+index 9494489d69..a1925edd35 100644
+--- a/gdk/wayland/gdkselection-wayland.c
++++ b/gdk/wayland/gdkselection-wayland.c
+@@ -937,7 +937,7 @@ data_source_cancelled (void *data,
+ gdk_drag_context_cancel (context, GDK_DRAG_CANCEL_ERROR);
+
+ emit_selection_clear (display, atom);
+- gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
++ gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, FALSE);
+ gdk_wayland_selection_unset_data_source (display, atom);
+ }
+
+@@ -1048,7 +1048,7 @@ primary_source_cancelled (void *data,
+
+ atom = atoms[ATOM_PRIMARY];
+ emit_selection_clear (display, atom);
+- gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
++ gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, FALSE);
+ gdk_wayland_selection_unset_data_source (display, atom);
+ }
+
+--
+2.22.0
+
diff --git a/gtk3.spec b/gtk3.spec
index e59538e..210d02a 100644
--- a/gtk3.spec
+++ b/gtk3.spec
@@ -25,7 +25,7 @@
Name: gtk3
Version: 3.24.12
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: GTK+ graphical user interface library
License: LGPLv2+
@@ -36,6 +36,10 @@ Source0: http://download.gnome.org/sources/gtk+/3.24/gtk+-%{version}.tar.xz
# https://gitlab.gnome.org/GNOME/mutter/issues/878
# https://bugzilla.redhat.com/show_bug.cgi?id=1763875
Patch0: 1142.patch
+# https://gitlab.gnome.org/GNOME/gtk/merge_requests/1146
+# Fixes a new bug that the previous patch (1142) introduced
+# https://gitlab.gnome.org/GNOME/mutter/issues/878#note_630326
+Patch1: 1146.patch
BuildRequires: pkgconfig(atk) >= %{atk_version}
BuildRequires: pkgconfig(atk-bridge-2.0)
@@ -330,6 +334,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || :
%{_datadir}/installed-tests/
%changelog
+* Tue Oct 22 2019 Adam Williamson <awilliam@redhat.com> - 3.24.12-3
+- Backport PR #1146 to fix a bug that #1142 introduced...
+
* Mon Oct 21 2019 Adam Williamson <awilliam@redhat.com> - 3.24.12-2
- Backport PR #1142 to try and fix intermittent copy/cut failures
bgstack15