import gtk3-3.22.30-6.el8

This commit is contained in:
CentOS Sources 2020-11-03 06:49:46 -05:00 committed by Andrew Lukoshko
parent 25145e4131
commit 185b71585a
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,49 @@
From 8ce68a519414df141e3de7432ab4d55564e933a0 Mon Sep 17 00:00:00 2001
From: Philip Withnall <withnall@endlessm.com>
Date: Fri, 4 Oct 2019 18:25:34 +0100
Subject: [PATCH] =?UTF-8?q?gtklistbox:=20Only=20unparent=20header=20rows?=
=?UTF-8?q?=20if=20they=20haven=E2=80=99t=20been=20reused?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Its possible for code which uses a `GtkListBox` to reuse a single
header row, and move it around between rows. For example, this might
happen if the code has interactive widgets (like buttons) in the row,
and doesnt want to continually recreate them and reattach signals to
them whenever the row headers change.
Unfortunately, this was broken, as the old header widget was
unconditionally unparented, even if it had just been set as the header
for a different row in the same `GtkListBox`. This left it assigned as
a child widget in the `GtkListBox` (so it was iterated over by
`forall`), but without its parent widget set.
Fix that by only unparenting the header if it hasnt already been
assigned as the parent of a different row.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
---
gtk/gtklistbox.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 36f9ec5246..db3ec5cbb8 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -2426,8 +2426,11 @@ gtk_list_box_update_header (GtkListBox *box,
priv->update_header_func_target);
if (old_header != ROW_PRIV (row)->header)
{
- if (old_header != NULL)
+ if (old_header != NULL &&
+ g_hash_table_lookup (priv->header_hash, old_header) == row)
{
+ /* Only unparent the @old_header if it hasnt been re-used as the
+ * header for a different row. */
gtk_widget_unparent (old_header);
g_hash_table_remove (priv->header_hash, old_header);
}
--
2.18.2

View File

@ -22,7 +22,7 @@
Name: gtk3 Name: gtk3
Version: 3.22.30 Version: 3.22.30
Release: 5%{?dist} Release: 6%{?dist}
Summary: GTK+ graphical user interface library Summary: GTK+ graphical user interface library
License: LGPLv2+ License: LGPLv2+
@ -37,6 +37,9 @@ Patch3: 0001-a11y-Include-window-management-buttons-in-headerbar.patch
# rhbz#1736742 # rhbz#1736742
Patch4: 0001-Add-a-gtk-overlay-scrolling-setting.patch Patch4: 0001-Add-a-gtk-overlay-scrolling-setting.patch
Patch5: 0002-scrolled-window-respect-overlay-scrolling-setting.patch Patch5: 0002-scrolled-window-respect-overlay-scrolling-setting.patch
# Backported from upstream / https://gitlab.gnome.org/GNOME/gtk/merge_requests/1114
# rhbz#1843486
Patch6: 0001-gtklistbox-Only-unparent-header-rows-if-they-haven-t.patch
BuildRequires: pkgconfig(atk) >= %{atk_version} BuildRequires: pkgconfig(atk) >= %{atk_version}
BuildRequires: pkgconfig(atk-bridge-2.0) BuildRequires: pkgconfig(atk-bridge-2.0)
@ -181,6 +184,7 @@ the functionality of the installed %{name} package.
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1
%build %build
export CFLAGS='-fno-strict-aliasing %optflags' export CFLAGS='-fno-strict-aliasing %optflags'
@ -339,6 +343,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || :
%{_datadir}/installed-tests %{_datadir}/installed-tests
%changelog %changelog
* Wed Jun 03 2020 Kalev Lember <klember@redhat.com> - 3.22.30-6
- Fix reuse of list box header widgets (#rhbz1843486)
* Thu Nov 21 2019 Benjamin Otte <otte@redhat.com> - 3.22.30-5 * Thu Nov 21 2019 Benjamin Otte <otte@redhat.com> - 3.22.30-5
- Add setting for turning off overlay scrollbars (rhbz#1736742) - Add setting for turning off overlay scrollbars (rhbz#1736742)