From 9c78e97c45d3507e960a80c5c83edb31ced9cc0c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 21 2020 18:43:21 +0000 Subject: import gtk3-3.22.30-5.el8 --- diff --git a/SOURCES/0001-Add-a-gtk-overlay-scrolling-setting.patch b/SOURCES/0001-Add-a-gtk-overlay-scrolling-setting.patch new file mode 100644 index 0000000..8047d8b --- /dev/null +++ b/SOURCES/0001-Add-a-gtk-overlay-scrolling-setting.patch @@ -0,0 +1,79 @@ +From 044383fe4533c59a0bbd58c977ed2ba5fb5862b8 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Fri, 31 May 2019 11:46:19 -0400 +Subject: [PATCH 1/2] Add a gtk-overlay-scrolling setting + +This is in preparation for letting user opt out of +overlay scrolling in the control-center. +--- + gdk/wayland/gdkscreen-wayland.c | 2 +- + gdk/x11/gdksettings.c | 1 + + gtk/gtksettings.c | 21 ++++++++++++++++++++- + 3 files changed, 22 insertions(+), 2 deletions(-) + +diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c +index 6aff3a5a1a..5e156072f2 100644 +--- a/gdk/wayland/gdkscreen-wayland.c ++++ b/gdk/wayland/gdkscreen-wayland.c +@@ -502,6 +502,7 @@ static TranslationEntry translations[] = { + { FALSE, "org.gnome.desktop.interface", "gtk-im-module", "gtk-im-module", G_TYPE_STRING, { .s = "simple" } }, + { FALSE, "org.gnome.desktop.interface", "enable-animations", "gtk-enable-animations", G_TYPE_BOOLEAN, { .b = TRUE } }, + { FALSE, "org.gnome.desktop.interface", "gtk-enable-primary-paste", "gtk-enable-primary-paste", G_TYPE_BOOLEAN, { .b = TRUE } }, ++ { FALSE, "org.gnome.desktop.interface", "overlay-scrolling", "gtk-overlay-scrolling", G_TYPE_BOOLEAN, { .b = TRUE } }, + { FALSE, "org.gnome.settings-daemon.peripherals.mouse", "double-click", "gtk-double-click-time", G_TYPE_INT, { .i = 400 } }, + { FALSE, "org.gnome.settings-daemon.peripherals.mouse", "drag-threshold", "gtk-dnd-drag-threshold", G_TYPE_INT, {.i = 8 } }, + { FALSE, "org.gnome.desktop.sound", "theme-name", "gtk-sound-theme-name", G_TYPE_STRING, { .s = "freedesktop" } }, +diff --git a/gdk/x11/gdksettings.c b/gdk/x11/gdksettings.c +index f8bb6d896b..869c239b18 100644 +--- a/gdk/x11/gdksettings.c ++++ b/gdk/x11/gdksettings.c +@@ -69,6 +69,7 @@ static const struct { + {"Gtk/RecentFilesMaxAge", "gtk-recent-files-max-age"}, + {"Gtk/RecentFilesEnabled", "gtk-recent-files-enabled"}, + {"Gtk/KeynavUseCaret", "gtk-keynav-use-caret"}, ++ {"Gtk/OverlayScrolling", "gtk-overlay-scrolling"}, + + /* These are here in order to be recognized, but are not sent to + gtk as they are handled internally by gdk: */ +diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c +index 571ae11cd4..b83d9d5561 100644 +--- a/gtk/gtksettings.c ++++ b/gtk/gtksettings.c +@@ -224,7 +224,8 @@ enum { + PROP_ENABLE_PRIMARY_PASTE, + PROP_RECENT_FILES_ENABLED, + PROP_LONG_PRESS_TIME, +- PROP_KEYNAV_USE_CARET ++ PROP_KEYNAV_USE_CARET, ++ PROP_OVERLAY_SCROLLING + }; + + /* --- prototypes --- */ +@@ -1767,6 +1768,24 @@ gtk_settings_class_init (GtkSettingsClass *class) + GTK_PARAM_READWRITE), + NULL); + g_assert (result == PROP_KEYNAV_USE_CARET); ++ ++ /** ++ * GtkSettings:gtk-overlay-scrolling: ++ * ++ * Whether scrolled windows may use overlayed scrolling indicators. ++ * If this is set to %FALSE, scrolled windows will have permanent ++ * scrollbars. ++ * ++ * Since: 3.24.9 ++ */ ++ result = settings_install_property_parser (class, ++ g_param_spec_boolean ("gtk-overlay-scrolling", ++ P_("Whether to use overlay scrollbars"), ++ P_("Whether to use overlay scrollbars"), ++ TRUE, ++ GTK_PARAM_READWRITE), ++ NULL); ++ g_assert (result == PROP_OVERLAY_SCROLLING); + } + + static void +-- +2.23.0 + diff --git a/SOURCES/0001-a11y-Include-window-management-buttons-in-headerbar.patch b/SOURCES/0001-a11y-Include-window-management-buttons-in-headerbar.patch new file mode 100644 index 0000000..1907e55 --- /dev/null +++ b/SOURCES/0001-a11y-Include-window-management-buttons-in-headerbar.patch @@ -0,0 +1,290 @@ +From bc1c0584b76e19d5d65bfa2ae809f95113e53c83 Mon Sep 17 00:00:00 2001 +From: Benjamin Otte +Date: Sun, 21 Jul 2019 23:15:00 +0200 +Subject: [PATCH] a11y: Include window management buttons in headerbar + +--- + gtk/a11y/Makefile.inc | 2 + + gtk/a11y/gtkheaderbaraccessible.c | 87 +++++++++++++++++++++++++++++++ + gtk/a11y/gtkheaderbaraccessible.h | 55 +++++++++++++++++++ + gtk/gtkcontainerprivate.h | 1 + + gtk/gtkheaderbar.c | 3 +- + 6 files changed, 149 insertions(+), 1 deletion(-) + create mode 100644 gtk/a11y/gtkheaderbaraccessible.c + create mode 100644 gtk/a11y/gtkheaderbaraccessible.h + +diff --git a/gtk/a11y/Makefile.inc b/gtk/a11y/Makefile.inc +index 8529c7ae57..3ed6c5decd 100644 +--- a/gtk/a11y/Makefile.inc ++++ b/gtk/a11y/Makefile.inc +@@ -14,6 +14,7 @@ a11y_h_sources = \ + a11y/gtkflowboxaccessible.h \ + a11y/gtkflowboxchildaccessible.h \ + a11y/gtkframeaccessible.h \ ++ a11y/gtkheaderbaraccessible.h \ + a11y/gtkiconviewaccessible.h \ + a11y/gtkimageaccessible.h \ + a11y/gtkimagecellaccessible.h \ +@@ -88,6 +89,7 @@ a11y_c_sources = \ + a11y/gtkflowboxaccessible.c \ + a11y/gtkflowboxchildaccessible.c \ + a11y/gtkframeaccessible.c \ ++ a11y/gtkheaderbaraccessible.c \ + a11y/gtkiconviewaccessible.c \ + a11y/gtkimageaccessible.c \ + a11y/gtkimagecellaccessible.c \ +--- a/gtk/Makefile.in ++++ b/gtk/Makefile.in +@@ -281,6 +281,7 @@ + a11y/gtkcontainercellaccessible.c a11y/gtkentryaccessible.c \ + a11y/gtkexpanderaccessible.c a11y/gtkflowboxaccessible.c \ + a11y/gtkflowboxchildaccessible.c a11y/gtkframeaccessible.c \ ++ a11y/gtkheaderbaraccessible.c \ + a11y/gtkiconviewaccessible.c a11y/gtkimageaccessible.c \ + a11y/gtkimagecellaccessible.c a11y/gtklabelaccessible.c \ + a11y/gtklevelbaraccessible.c a11y/gtklinkbuttonaccessible.c \ +@@ -487,6 +488,7 @@ + a11y/libgtk_3_la-gtkflowboxaccessible.lo \ + a11y/libgtk_3_la-gtkflowboxchildaccessible.lo \ + a11y/libgtk_3_la-gtkframeaccessible.lo \ ++ a11y/libgtk_3_la-gtkheaderbaraccessible.lo \ + a11y/libgtk_3_la-gtkiconviewaccessible.lo \ + a11y/libgtk_3_la-gtkimageaccessible.lo \ + a11y/libgtk_3_la-gtkimagecellaccessible.lo \ +@@ -1389,6 +1391,7 @@ + a11y/gtkflowboxaccessible.h \ + a11y/gtkflowboxchildaccessible.h \ + a11y/gtkframeaccessible.h \ ++ a11y/gtkheaderbaraccessible.h \ + a11y/gtkiconviewaccessible.h \ + a11y/gtkimageaccessible.h \ + a11y/gtkimagecellaccessible.h \ +@@ -1463,6 +1466,7 @@ + a11y/gtkflowboxaccessible.c \ + a11y/gtkflowboxchildaccessible.c \ + a11y/gtkframeaccessible.c \ ++ a11y/gtkheaderbaraccessible.c \ + a11y/gtkiconviewaccessible.c \ + a11y/gtkimageaccessible.c \ + a11y/gtkimagecellaccessible.c \ +@@ -2702,6 +2706,8 @@ + a11y/$(DEPDIR)/$(am__dirstamp) + a11y/libgtk_3_la-gtkframeaccessible.lo: a11y/$(am__dirstamp) \ + a11y/$(DEPDIR)/$(am__dirstamp) ++a11y/libgtk_3_la-gtkheaderbaraccessible.lo: a11y/$(am__dirstamp) \ ++ a11y/$(DEPDIR)/$(am__dirstamp) + a11y/libgtk_3_la-gtkiconviewaccessible.lo: a11y/$(am__dirstamp) \ + a11y/$(DEPDIR)/$(am__dirstamp) + a11y/libgtk_3_la-gtkimageaccessible.lo: a11y/$(am__dirstamp) \ +@@ -3447,6 +3453,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@a11y/$(DEPDIR)/libgtk_3_la-gtkflowboxaccessible.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@a11y/$(DEPDIR)/libgtk_3_la-gtkflowboxchildaccessible.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@a11y/$(DEPDIR)/libgtk_3_la-gtkframeaccessible.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@a11y/$(DEPDIR)/libgtk_3_la-gtkheaderbaraccessible.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@a11y/$(DEPDIR)/libgtk_3_la-gtkiconviewaccessible.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@a11y/$(DEPDIR)/libgtk_3_la-gtkimageaccessible.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@a11y/$(DEPDIR)/libgtk_3_la-gtkimagecellaccessible.Plo@am__quote@ +@@ -3705,6 +3712,13 @@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgtk_3_la_CFLAGS) $(CFLAGS) -c -o a11y/libgtk_3_la-gtkframeaccessible.lo `test -f 'a11y/gtkframeaccessible.c' || echo '$(srcdir)/'`a11y/gtkframeaccessible.c + ++a11y/libgtk_3_la-gtkheaderbaraccessible.lo: a11y/gtkheaderbaraccessible.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgtk_3_la_CFLAGS) $(CFLAGS) -MT a11y/libgtk_3_la-gtkheaderbaraccessible.lo -MD -MP -MF a11y/$(DEPDIR)/libgtk_3_la-gtkheaderbaraccessible.Tpo -c -o a11y/libgtk_3_la-gtkheaderbaraccessible.lo `test -f 'a11y/gtkheaderbaraccessible.c' || echo '$(srcdir)/'`a11y/gtkheaderbaraccessible.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) a11y/$(DEPDIR)/libgtk_3_la-gtkheaderbaraccessible.Tpo a11y/$(DEPDIR)/libgtk_3_la-gtkheaderbaraccessible.Plo ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='a11y/gtkheaderbaraccessible.c' object='a11y/libgtk_3_la-gtkheaderbaraccessible.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgtk_3_la_CFLAGS) $(CFLAGS) -c -o a11y/libgtk_3_la-gtkheaderbaraccessible.lo `test -f 'a11y/gtkheaderbaraccessible.c' || echo '$(srcdir)/'`a11y/gtkheaderbaraccessible.c ++ + a11y/libgtk_3_la-gtkiconviewaccessible.lo: a11y/gtkiconviewaccessible.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgtk_3_la_CFLAGS) $(CFLAGS) -MT a11y/libgtk_3_la-gtkiconviewaccessible.lo -MD -MP -MF a11y/$(DEPDIR)/libgtk_3_la-gtkiconviewaccessible.Tpo -c -o a11y/libgtk_3_la-gtkiconviewaccessible.lo `test -f 'a11y/gtkiconviewaccessible.c' || echo '$(srcdir)/'`a11y/gtkiconviewaccessible.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) a11y/$(DEPDIR)/libgtk_3_la-gtkiconviewaccessible.Tpo a11y/$(DEPDIR)/libgtk_3_la-gtkiconviewaccessible.Plo +diff --git a/gtk/a11y/gtkheaderbaraccessible.c b/gtk/a11y/gtkheaderbaraccessible.c +new file mode 100644 +index 0000000000..3610ac0d1f +--- /dev/null ++++ b/gtk/a11y/gtkheaderbaraccessible.c +@@ -0,0 +1,87 @@ ++/* GTK+ - accessibility implementations ++ * Copyright 2001, 2002, 2003 Sun Microsystems Inc. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library. If not, see . ++ */ ++ ++#include "config.h" ++ ++#include "gtkheaderbaraccessible.h" ++ ++#include "gtkcontainerprivate.h" ++ ++G_DEFINE_TYPE (GtkHeaderBarAccessible, gtk_header_bar_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE) ++ ++static void ++count_widget (GtkWidget *widget, ++ gint *count) ++{ ++ (*count)++; ++} ++ ++static gint ++gtk_header_bar_accessible_get_n_children (AtkObject* obj) ++{ ++ GtkWidget *widget; ++ gint count = 0; ++ ++ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); ++ if (widget == NULL) ++ return 0; ++ ++ gtk_container_forall (GTK_CONTAINER (widget), (GtkCallback) count_widget, &count); ++ return count; ++} ++ ++static AtkObject * ++gtk_header_bar_accessible_ref_child (AtkObject *obj, ++ gint i) ++{ ++ GList *children, *tmp_list; ++ AtkObject *accessible; ++ GtkWidget *widget; ++ ++ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); ++ if (widget == NULL) ++ return NULL; ++ ++ children = gtk_container_get_all_children (GTK_CONTAINER (widget)); ++ tmp_list = g_list_nth (children, i); ++ if (!tmp_list) ++ { ++ g_list_free (children); ++ return NULL; ++ } ++ accessible = gtk_widget_get_accessible (GTK_WIDGET (tmp_list->data)); ++ ++ g_list_free (children); ++ g_object_ref (accessible); ++ ++ return accessible; ++} ++ ++static void ++gtk_header_bar_accessible_class_init (GtkHeaderBarAccessibleClass *klass) ++{ ++ AtkObjectClass *class = ATK_OBJECT_CLASS (klass); ++ ++ class->get_n_children = gtk_header_bar_accessible_get_n_children; ++ class->ref_child = gtk_header_bar_accessible_ref_child; ++} ++ ++static void ++gtk_header_bar_accessible_init (GtkHeaderBarAccessible *header_bar) ++{ ++} ++ +diff --git a/gtk/a11y/gtkheaderbaraccessible.h b/gtk/a11y/gtkheaderbaraccessible.h +new file mode 100644 +index 0000000000..fca9428a94 +--- /dev/null ++++ b/gtk/a11y/gtkheaderbaraccessible.h +@@ -0,0 +1,55 @@ ++/* GTK+ - accessibility implementations ++ * Copyright 2001, 2002, 2003 Sun Microsystems Inc. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library. If not, see . ++ */ ++ ++#ifndef __GTK_HEADER_BAR_ACCESSIBLE_H__ ++#define __GTK_HEADER_BAR_ACCESSIBLE_H__ ++ ++#if !defined (__GTK_A11Y_H_INSIDE__) && !defined (GTK_COMPILATION) ++#error "Only can be included directly." ++#endif ++ ++#include ++ ++G_BEGIN_DECLS ++ ++#define GTK_TYPE_HEADER_BAR_ACCESSIBLE (gtk_header_bar_accessible_get_type ()) ++#define GTK_HEADER_BAR_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HEADER_BAR_ACCESSIBLE, GtkHeaderBarAccessible)) ++#define GTK_HEADER_BAR_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HEADER_BAR_ACCESSIBLE, GtkHeaderBarAccessibleClass)) ++#define GTK_IS_HEADER_BAR_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HEADER_BAR_ACCESSIBLE)) ++#define GTK_IS_HEADER_BAR_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HEADER_BAR_ACCESSIBLE)) ++#define GTK_HEADER_BAR_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HEADER_BAR_ACCESSIBLE, GtkHeaderBarAccessibleClass)) ++ ++typedef struct _GtkHeaderBarAccessible GtkHeaderBarAccessible; ++typedef struct _GtkHeaderBarAccessibleClass GtkHeaderBarAccessibleClass; ++typedef struct _GtkHeaderBarAccessiblePrivate GtkHeaderBarAccessiblePrivate; ++ ++struct _GtkHeaderBarAccessible ++{ ++ GtkContainerAccessible parent; ++}; ++ ++struct _GtkHeaderBarAccessibleClass ++{ ++ GtkContainerAccessibleClass parent_class; ++}; ++ ++GDK_AVAILABLE_IN_ALL ++GType gtk_header_bar_accessible_get_type (void); ++ ++G_END_DECLS ++ ++#endif /* __GTK_HEADER_BAR_ACCESSIBLE_H__ */ +diff --git a/gtk/gtkcontainerprivate.h b/gtk/gtkcontainerprivate.h +index 7402a6676b..547e0295c3 100644 +--- a/gtk/gtkcontainerprivate.h ++++ b/gtk/gtkcontainerprivate.h +@@ -42,6 +42,7 @@ void _gtk_container_maybe_start_idle_sizer (GtkContainer *container); + gboolean _gtk_container_get_border_width_set (GtkContainer *container); + void _gtk_container_set_border_width_set (GtkContainer *container, + gboolean border_width_set); ++GList * gtk_container_get_all_children (GtkContainer *container); + void gtk_container_get_children_clip (GtkContainer *container, + GtkAllocation *out_clip); + void gtk_container_set_default_resize_mode (GtkContainer *container, +diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c +index dd7d2093c9..0ef94e3c84 100644 +--- a/gtk/gtkheaderbar.c ++++ b/gtk/gtkheaderbar.c +@@ -30,7 +30,7 @@ + #include "gtkwindowprivate.h" + #include "gtkwidgetprivate.h" + #include "gtkcontainerprivate.h" +-#include "a11y/gtkcontaineraccessible.h" ++#include "a11y/gtkheaderbaraccessible.h" + + #include + +@@ -2118,6 +2118,7 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class) + + g_object_class_install_properties (object_class, LAST_PROP, header_bar_props); + ++ gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_HEADER_BAR_ACCESSIBLE); + gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_PANEL); + gtk_widget_class_set_css_name (widget_class, "headerbar"); + } +-- +2.21.0 + diff --git a/SOURCES/0002-scrolled-window-respect-overlay-scrolling-setting.patch b/SOURCES/0002-scrolled-window-respect-overlay-scrolling-setting.patch new file mode 100644 index 0000000..e62b8e8 --- /dev/null +++ b/SOURCES/0002-scrolled-window-respect-overlay-scrolling-setting.patch @@ -0,0 +1,50 @@ +From 26b24916c8570a73bdc9d7a736584ceb68384c81 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Fri, 31 May 2019 11:51:20 -0400 +Subject: [PATCH 2/2] scrolled window: respect overlay-scrolling setting + +If the gtk-overlay-scrolling setting is FALSE, +don't use overlay scrollbars. +--- + gtk/gtkscrolledwindow.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c +index d52ccf646c..b2dc1d1c79 100644 +--- a/gtk/gtkscrolledwindow.c ++++ b/gtk/gtkscrolledwindow.c +@@ -704,6 +704,9 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class) + * is present. Otherwise, they are overlayed on top of the content, + * as narrow indicators. + * ++ * Note that overlay scrolling can also be globally disabled, with ++ * the #GtkSettings::gtk-overlay-scrolling setting. ++ * + * Since: 3.16 + */ + properties[PROP_OVERLAY_SCROLLING] = +@@ -4163,6 +4166,7 @@ gtk_scrolled_window_map (GtkWidget *widget) + GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->map (widget); + + gtk_scrolled_window_update_animating (scrolled_window); ++ gtk_scrolled_window_update_use_indicators (scrolled_window); + } + + static void +@@ -4439,8 +4443,12 @@ gtk_scrolled_window_update_use_indicators (GtkScrolledWindow *scrolled_window) + { + GtkScrolledWindowPrivate *priv = scrolled_window->priv; + gboolean use_indicators; ++ GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (scrolled_window)); ++ gboolean overlay_scrolling; ++ ++ g_object_get (settings, "gtk-overlay-scrolling", &overlay_scrolling, NULL); + +- use_indicators = priv->overlay_scrolling; ++ use_indicators = overlay_scrolling && priv->overlay_scrolling; + + if (g_strcmp0 (g_getenv ("GTK_OVERLAY_SCROLLING"), "0") == 0) + use_indicators = FALSE; +-- +2.23.0 + diff --git a/SPECS/gtk3.spec b/SPECS/gtk3.spec index 1cee05c..35ab417 100644 --- a/SPECS/gtk3.spec +++ b/SPECS/gtk3.spec @@ -22,7 +22,7 @@ Name: gtk3 Version: 3.22.30 -Release: 3%{?dist} +Release: 5%{?dist} Summary: GTK+ graphical user interface library License: LGPLv2+ @@ -32,6 +32,11 @@ Source0: http://download.gnome.org/sources/gtk+/3.22/gtk+-%{version}.tar.xz # rhbz#1656447 / https://gitlab.gnome.org/GNOME/gtk/issues/1507 Patch1: 0001-a11y-Check-X11-display-at-runtime.patch Patch2: 0001-a11y-Check-display-in-grab_cell_focus.patch +# ehbz#1723836 +Patch3: 0001-a11y-Include-window-management-buttons-in-headerbar.patch +# rhbz#1736742 +Patch4: 0001-Add-a-gtk-overlay-scrolling-setting.patch +Patch5: 0002-scrolled-window-respect-overlay-scrolling-setting.patch BuildRequires: pkgconfig(atk) >= %{atk_version} BuildRequires: pkgconfig(atk-bridge-2.0) @@ -173,6 +178,9 @@ the functionality of the installed %{name} package. %setup -q -n gtk+-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %build export CFLAGS='-fno-strict-aliasing %optflags' @@ -331,6 +339,12 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || : %{_datadir}/installed-tests %changelog +* Thu Nov 21 2019 Benjamin Otte - 3.22.30-5 +- Add setting for turning off overlay scrollbars (rhbz#1736742) + +* Thu Aug 15 2019 Benjamin Otte - 3.22.30-4 +- Include headerbar buttons in accessibility (rhbz#1723836) + * Mon Jan 14 2019 Olivier Fourdan - 3.22.30-3 - Fix a couple of crashes when using the accessibility interface under Wayland (rhbz#1656447)