Fix keyboard accessibility of screen resolutions list
Resolves: #2168686
This commit is contained in:
parent
7d87b39284
commit
3616900b8d
@ -0,0 +1,50 @@
|
|||||||
|
From 7196e8aaea48054dd5fe825d371aec2319960897 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carlos Garnacho <carlosg@gnome.org>
|
||||||
|
Date: Wed, 21 Apr 2021 20:54:06 +0200
|
||||||
|
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
|
||||||
|
---
|
||||||
|
shell/cc-window.c | 15 ++++++++++-----
|
||||||
|
1 file changed, 10 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/shell/cc-window.c b/shell/cc-window.c
|
||||||
|
index 400c39116..de4eccc04 100644
|
||||||
|
--- a/shell/cc-window.c
|
||||||
|
+++ b/shell/cc-window.c
|
||||||
|
@@ -585,12 +585,17 @@ gdk_window_set_cb (CcWindow *self)
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
-window_map_event_cb (CcWindow *self)
|
||||||
|
+window_map_event_cb (CcWindow *self,
|
||||||
|
+ GdkEvent *event)
|
||||||
|
{
|
||||||
|
- /* 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.3
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
Name: gnome-control-center
|
Name: gnome-control-center
|
||||||
Version: 40.0
|
Version: 40.0
|
||||||
Release: 28%{?dist}
|
Release: 29%{?dist}
|
||||||
Summary: Utilities to configure the GNOME desktop
|
Summary: Utilities to configure the GNOME desktop
|
||||||
|
|
||||||
License: GPLv2+ and CC-BY-SA
|
License: GPLv2+ and CC-BY-SA
|
||||||
@ -50,6 +50,9 @@ Patch12: display-infobar-if-night-light-unsupported.patch
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2110581
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2110581
|
||||||
Patch13: gnome-control-center-wwan-5g-support.patch
|
Patch13: gnome-control-center-wwan-5g-support.patch
|
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2168686
|
||||||
|
Patch14: 0001-shell-Avoid-handling-map-events-from-other-windows.patch
|
||||||
|
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
@ -239,6 +242,10 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
|
|||||||
%dir %{_datadir}/gnome/wm-properties
|
%dir %{_datadir}/gnome/wm-properties
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 10 2023 Felipe Borges <feborges@redhat.com> - 40.0-29
|
||||||
|
- Fix keyboard accessibility of screen resolution list
|
||||||
|
Resolves: rhbz#2168686
|
||||||
|
|
||||||
* Wed Oct 26 2022 Felipe Borges <feborges@redhat.com> - 40.0-28
|
* Wed Oct 26 2022 Felipe Borges <feborges@redhat.com> - 40.0-28
|
||||||
- Support WWAN 5G connections
|
- Support WWAN 5G connections
|
||||||
Resolves: rhbz#2110581
|
Resolves: rhbz#2110581
|
||||||
|
Loading…
Reference in New Issue
Block a user