From 8afe3fb89067491628b1790867894da3be48f762 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 9 Feb 2023 06:10:29 +0000 Subject: [PATCH] import gnome-control-center-3.28.2-37.el8 --- ...ndling-map-events-from-other-windows.patch | 48 +++++++++++++++++++ SPECS/gnome-control-center.spec | 9 +++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0001-shell-Avoid-handling-map-events-from-other-windows.patch diff --git a/SOURCES/0001-shell-Avoid-handling-map-events-from-other-windows.patch b/SOURCES/0001-shell-Avoid-handling-map-events-from-other-windows.patch new file mode 100644 index 0000000..f82110f --- /dev/null +++ b/SOURCES/0001-shell-Avoid-handling-map-events-from-other-windows.patch @@ -0,0 +1,48 @@ +From 928eebadf0fd960472a83159c9888d946cd75ed2 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Wed, 21 Apr 2021 18:54:06 +0000 +Subject: [PATCH] shell: Avoid handling map events from other windows + +The CcWindow tries to unset the focus when first mapping the window. +However this pretty wide check intercepts mapping events from other +windows than the toplevel (e.g. subsurfaces, for popovers). This +causes the focus to move away from the popover, overriding its +modality. + +Check that the event received is addressed to the CcWindow's +GDK window before unsetting the focus, so we don't mess with popover +focus. + +Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1327 + +(cherry picked from commit 7196e8aaea48054dd5fe825d371aec2319960897) +--- + shell/cc-window.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/shell/cc-window.c b/shell/cc-window.c +index 9144834a4..fe5ad1ee7 100644 +--- a/shell/cc-window.c ++++ b/shell/cc-window.c +@@ -458,10 +458,14 @@ window_map_event_cb (GtkWidget *widget, + GdkEvent *event, + CcWindow *self) + { +- /* If focus ends up in a category icon view one of the items is +- * immediately selected which looks odd when we are starting up, so +- * we explicitly unset the focus here. */ +- gtk_window_set_focus (GTK_WINDOW (self), NULL); ++ if (event->any.window == gtk_widget_get_window (GTK_WIDGET (self))) ++ { ++ /* If focus ends up in a category icon view one of the items is ++ * immediately selected which looks odd when we are starting up, so ++ * we explicitly unset the focus here. */ ++ gtk_window_set_focus (GTK_WINDOW (self), NULL); ++ } ++ + return GDK_EVENT_PROPAGATE; + } + +-- +2.37.1 + diff --git a/SPECS/gnome-control-center.spec b/SPECS/gnome-control-center.spec index 9626ea6..c8b24fb 100644 --- a/SPECS/gnome-control-center.spec +++ b/SPECS/gnome-control-center.spec @@ -11,7 +11,7 @@ Name: gnome-control-center Version: 3.28.2 -Release: 36%{?dist} +Release: 37%{?dist} Summary: Utilities to configure the GNOME desktop License: GPLv2+ and CC-BY-SA @@ -90,6 +90,9 @@ Patch42: 0001-timezone-use-blank-map.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2079139 Patch43: 0001-wifi-Move-airplane-mode-widget-above-the-main-stack.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1926995 +Patch44: 0001-shell-Avoid-handling-map-events-from-other-windows.patch + BuildRequires: chrpath BuildRequires: cups-devel BuildRequires: desktop-file-utils @@ -263,6 +266,10 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center %dir %{_datadir}/gnome/wm-properties %changelog +* Mon Jan 02 2023 Felipe Borges - 4.28.2-37 +- Fix keyboard accessibility of screen resolution list + Resolves: #1926995 + * Mon Aug 15 2022 Felipe Borges - 3.28.2-36 - Update airplane mode fix to synchronize with system changes Resolves: #2079139