import gtk3-3.22.30-10.el8
This commit is contained in:
parent
2160fe36de
commit
7fe2f41df2
40
SOURCES/gtk-3.22.20-avoid-cellarea-crash.patch
Normal file
40
SOURCES/gtk-3.22.20-avoid-cellarea-crash.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 4ba89f25b8a88616afc1915bdb4fb87d13efae6f Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Otte <otte@redhat.com>
|
||||
Date: Tue, 15 Jun 2021 19:34:37 +0200
|
||||
Subject: [PATCH] cellarea: Don't shrink area too much
|
||||
|
||||
Do not compute rectangles with negative width/height. This avoids
|
||||
assertion failures further down when those rectangles were actually
|
||||
checked.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1962215
|
||||
---
|
||||
gtk/gtkcellarea.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c
|
||||
index 575e1c7fde..d1b3b1a279 100644
|
||||
--- a/gtk/gtkcellarea.c
|
||||
+++ b/gtk/gtkcellarea.c
|
||||
@@ -3563,8 +3563,18 @@ gtk_cell_area_inner_cell_area (GtkCellArea *area,
|
||||
|
||||
*inner_area = *cell_area;
|
||||
|
||||
+ if (border.left + border.right > cell_area->width)
|
||||
+ {
|
||||
+ border.left = cell_area->width / 2;
|
||||
+ border.right = (cell_area->width + 1) / 2;
|
||||
+ }
|
||||
inner_area->x += border.left;
|
||||
inner_area->width -= border.left + border.right;
|
||||
+ if (border.top + border.bottom > cell_area->height)
|
||||
+ {
|
||||
+ border.top = cell_area->height / 2;
|
||||
+ border.bottom = (cell_area->height + 1) / 2;
|
||||
+ }
|
||||
inner_area->y += border.top;
|
||||
inner_area->height -= border.top + border.bottom;
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
91
SOURCES/gtk-3.22.20-fix-treeview-refcount.patch
Normal file
91
SOURCES/gtk-3.22.20-fix-treeview-refcount.patch
Normal file
@ -0,0 +1,91 @@
|
||||
From d4f62b44d47e3dddfb57add4f1f76cab0297584d Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Fri, 11 Jun 2021 08:53:46 -0400
|
||||
Subject: [PATCH 1/2] a11y: Fix ref counting in tree views
|
||||
|
||||
GtkContainerCellAccessible wasn't unsetting accessible
|
||||
parents. Fix that.
|
||||
|
||||
By itself, this doesn't help for freeing a memory leak,
|
||||
since AtkObject keeps a ref on its parent, so we never
|
||||
free the GtkContainerCellAccessible as long as it has children.
|
||||
---
|
||||
gtk/a11y/gtkcontainercellaccessible.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gtk/a11y/gtkcontainercellaccessible.c b/gtk/a11y/gtkcontainercellaccessible.c
|
||||
index a756e3cadf..a40446fb47 100644
|
||||
--- a/gtk/a11y/gtkcontainercellaccessible.c
|
||||
+++ b/gtk/a11y/gtkcontainercellaccessible.c
|
||||
@@ -30,12 +30,19 @@ struct _GtkContainerCellAccessiblePrivate
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkContainerCellAccessible, gtk_container_cell_accessible, GTK_TYPE_CELL_ACCESSIBLE)
|
||||
|
||||
|
||||
+static void
|
||||
+unset_child (gpointer child)
|
||||
+{
|
||||
+ atk_object_set_parent (ATK_OBJECT (child), NULL);
|
||||
+ g_object_unref (child);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
gtk_container_cell_accessible_finalize (GObject *obj)
|
||||
{
|
||||
GtkContainerCellAccessible *container = GTK_CONTAINER_CELL_ACCESSIBLE (obj);
|
||||
|
||||
- g_list_free_full (container->priv->children, g_object_unref);
|
||||
+ g_list_free_full (container->priv->children, unset_child);
|
||||
|
||||
G_OBJECT_CLASS (gtk_container_cell_accessible_parent_class)->finalize (obj);
|
||||
}
|
||||
@@ -157,6 +164,7 @@ gtk_container_cell_accessible_remove_child (GtkContainerCellAccessible *containe
|
||||
g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (child));
|
||||
g_return_if_fail (container->priv->n_children > 0);
|
||||
|
||||
+ atk_object_set_parent (ATK_OBJECT (child), NULL);
|
||||
container->priv->children = g_list_remove (container->priv->children, child);
|
||||
container->priv->n_children--;
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 21f8098261486417db371b202bc0494c12017468 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Fri, 11 Jun 2021 08:55:48 -0400
|
||||
Subject: [PATCH 2/2] a11y: Plug a memory leak with treeviews
|
||||
|
||||
We need to explicitly remove the children from
|
||||
a GtkContainerCellAccessible, since they otherwise
|
||||
keep the parent alive.
|
||||
|
||||
Fixes: #3981
|
||||
---
|
||||
gtk/a11y/gtktreeviewaccessible.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
|
||||
index adad462064..c1a2097a1e 100644
|
||||
--- a/gtk/a11y/gtktreeviewaccessible.c
|
||||
+++ b/gtk/a11y/gtktreeviewaccessible.c
|
||||
@@ -104,6 +104,17 @@ static void
|
||||
cell_info_free (GtkTreeViewAccessibleCellInfo *cell_info)
|
||||
{
|
||||
gtk_accessible_set_widget (GTK_ACCESSIBLE (cell_info->cell), NULL);
|
||||
+ if (GTK_IS_CONTAINER_CELL_ACCESSIBLE (cell_info->cell))
|
||||
+ {
|
||||
+ GList *children;
|
||||
+
|
||||
+ while ((children = gtk_container_cell_accessible_get_children (GTK_CONTAINER_CELL_ACCESSIBLE (cell_info->cell))) != NULL)
|
||||
+ {
|
||||
+ GtkCellAccessible *child = children->data;
|
||||
+ gtk_container_cell_accessible_remove_child (GTK_CONTAINER_CELL_ACCESSIBLE (cell_info->cell), child);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
g_object_unref (cell_info->cell);
|
||||
|
||||
g_free (cell_info);
|
||||
--
|
||||
GitLab
|
||||
|
27
SOURCES/gtk-3.22.20-fix-treeview-refcount2.patch
Normal file
27
SOURCES/gtk-3.22.20-fix-treeview-refcount2.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From cc977be580b9a7c2683810fe36fe485ee8583ec0 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Fri, 11 Feb 2022 18:39:55 -0500
|
||||
Subject: [PATCH] Fix a leak of cell accessibles
|
||||
|
||||
gtk_container_cell_accessible_add_child is transfer none,
|
||||
so we need to drop the reference we hold, otherwise it
|
||||
leaks.
|
||||
---
|
||||
gtk/a11y/gtktreeviewaccessible.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
|
||||
index c1a2097a1e..c2b7e8add0 100644
|
||||
--- a/gtk/a11y/gtktreeviewaccessible.c
|
||||
+++ b/gtk/a11y/gtktreeviewaccessible.c
|
||||
@@ -413,6 +413,7 @@ create_cell_accessible (GtkTreeView *treeview,
|
||||
{
|
||||
cell = create_cell_accessible_for_renderer (l->data, GTK_WIDGET (treeview), ATK_OBJECT (container));
|
||||
gtk_container_cell_accessible_add_child (container, cell);
|
||||
+ g_object_unref (cell);
|
||||
}
|
||||
|
||||
cell = GTK_CELL_ACCESSIBLE (container);
|
||||
--
|
||||
GitLab
|
||||
|
51
SOURCES/gtk-3.22.20-quiet-exit.patch
Normal file
51
SOURCES/gtk-3.22.20-quiet-exit.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From c3503fcc84eec0bcf857cc744580aa9a4d5dc7eb Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Tue, 13 Apr 2021 14:10:27 -0400
|
||||
Subject: [PATCH] x11: Be quiet on exit by default
|
||||
|
||||
The condition we check for to catch X servers going away
|
||||
may not be accurate anymore, and the warning shows up in
|
||||
logs, causing customers to be concerned. So, be quiet by
|
||||
default, unless the user explicitly asked for a message.
|
||||
---
|
||||
gdk/x11/gdkmain-x11.c | 23 ++++++-----------------
|
||||
1 file changed, 6 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
|
||||
index 64c7cb4302..cd877ce3e4 100644
|
||||
--- a/gdk/x11/gdkmain-x11.c
|
||||
+++ b/gdk/x11/gdkmain-x11.c
|
||||
@@ -240,24 +240,13 @@ gdk_x_io_error (Display *display)
|
||||
/* This is basically modelled after the code in XLib. We need
|
||||
* an explicit error handler here, so we can disable our atexit()
|
||||
* which would otherwise cause a nice segfault.
|
||||
- * We fprintf(stderr, instead of g_warning() because g_warning()
|
||||
- * could possibly be redirected to a dialog
|
||||
+ * We g_debug() instead of g_warning(), because g_warning()
|
||||
+ * could possibly be redirected to the log
|
||||
*/
|
||||
- if (errno == EPIPE)
|
||||
- {
|
||||
- g_message ("The application '%s' lost its connection to the display %s;\n"
|
||||
- "most likely the X server was shut down or you killed/destroyed\n"
|
||||
- "the application.\n",
|
||||
- g_get_prgname (),
|
||||
- display ? DisplayString (display) : gdk_get_display_arg_name ());
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- g_message ("%s: Fatal IO error %d (%s) on X server %s.\n",
|
||||
- g_get_prgname (),
|
||||
- errno, g_strerror (errno),
|
||||
- display ? DisplayString (display) : gdk_get_display_arg_name ());
|
||||
- }
|
||||
+ g_debug ("%s: Fatal IO error %d (%s) on X server %s.\n",
|
||||
+ g_get_prgname (),
|
||||
+ errno, g_strerror (errno),
|
||||
+ display ? DisplayString (display) : gdk_get_display_arg_name ());
|
||||
|
||||
_exit (1);
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
Name: gtk3
|
||||
Version: 3.22.30
|
||||
Release: 8%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Summary: GTK+ graphical user interface library
|
||||
|
||||
License: LGPLv2+
|
||||
@ -46,6 +46,13 @@ Patch7: 0001-entry-Only-offer-Emoji-if-requested.patch
|
||||
Patch8: 0001-fix-nonoverlay-scrollbars.patch
|
||||
# Upstream patch to make reftests work in a vm
|
||||
Patch9: 0001-reftests-Enforce-default-settings.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2032438
|
||||
Patch10: gtk-3.22.20-fix-treeview-refcount.patch
|
||||
Patch11: gtk-3.22.20-fix-treeview-refcount2.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1887266
|
||||
Patch12: gtk-3.22.20-quiet-exit.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2032437
|
||||
Patch13: gtk-3.22.20-avoid-cellarea-crash.patch
|
||||
|
||||
BuildRequires: pkgconfig(atk) >= %{atk_version}
|
||||
BuildRequires: pkgconfig(atk-bridge-2.0)
|
||||
@ -194,6 +201,10 @@ the functionality of the installed %{name} package.
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS='-fno-strict-aliasing %optflags'
|
||||
@ -352,6 +363,14 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || :
|
||||
%{_datadir}/installed-tests
|
||||
|
||||
%changelog
|
||||
* Tue Feb 15 2022 David King <dking@redhat.com> - 3.22.30-10
|
||||
- Further treeview a11y refcount fix (#2032438)
|
||||
|
||||
* Mon Jan 17 2022 David King <dking@redhat.com> - 3.22.30-9
|
||||
- Fix treeview a11y refcounting (#2032438)
|
||||
- Be quiet on exit under X11 (#1887266)
|
||||
- Avoid cellarea resize crash (#2032437)
|
||||
|
||||
* Mon Jul 19 2021 Matthias Clasen <mclasen@redhat.com> - 3.22.30-8
|
||||
- Make reftests work in a vm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user