From 7728c1cc58b4242c92a663245daa1ee015b2fbf1 Mon Sep 17 00:00:00 2001 From: anolis-bot Date: Tue, 16 May 2023 14:35:35 +0800 Subject: [PATCH] update to gnome-control-center-3.28.2-37.el8 Signed-off-by: anolis-bot --- ...ndling-map-events-from-other-windows.patch | 48 ++ ...ane-mode-widget-above-the-main-stack.patch | 599 ++++++++++++++++++ dist | 1 + distro-logo.patch | 2 +- gnome-control-center.spec | 35 +- 5 files changed, 673 insertions(+), 12 deletions(-) create mode 100644 0001-shell-Avoid-handling-map-events-from-other-windows.patch create mode 100644 0001-wifi-Move-airplane-mode-widget-above-the-main-stack.patch create mode 100644 dist diff --git a/0001-shell-Avoid-handling-map-events-from-other-windows.patch b/0001-shell-Avoid-handling-map-events-from-other-windows.patch new file mode 100644 index 0000000..f82110f --- /dev/null +++ b/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/0001-wifi-Move-airplane-mode-widget-above-the-main-stack.patch b/0001-wifi-Move-airplane-mode-widget-above-the-main-stack.patch new file mode 100644 index 0000000..673d629 --- /dev/null +++ b/0001-wifi-Move-airplane-mode-widget-above-the-main-stack.patch @@ -0,0 +1,599 @@ +From ecc4b3d0f021012a5f46bb7852bb85cc314468b9 Mon Sep 17 00:00:00 2001 +From: Felipe Borges +Date: Wed, 3 Aug 2022 10:49:05 +0200 +Subject: [PATCH] network: Split airplane-mode widget off main Wi-Fi panel + stack + +The airplane-mode widget (rfkill_widget) on the wifi panel was part +of the "wifi-connections" stack page, and it would get hidden +whenever the panel switched to another page ("nm-not-running" or +"no-wifi-devices"). + +This way, whenever a user would turn airplane-mode ON, the panel +would disable wifi and set the main stack page to "no-wifi-devices", +making the airplane-mode widget inaccessible, preventing users from +turning airplane-mode OFF in gnome-control-center. + +These changes reorganize the widget hierarchy as such that the +airplane-mode widget is now above the main stack and will persist +visible as the main stack changes. +--- + panels/network/cc-wifi-panel.c | 17 ++ + panels/network/wifi.ui | 464 +++++++++++++++++---------------- + 2 files changed, 255 insertions(+), 226 deletions(-) + +diff --git a/panels/network/cc-wifi-panel.c b/panels/network/cc-wifi-panel.c +index 2c1cd17b7..989506c6a 100644 +--- a/panels/network/cc-wifi-panel.c ++++ b/panels/network/cc-wifi-panel.c +@@ -411,6 +411,17 @@ wireless_enabled_cb (NMClient *client, + check_main_stack_page (self); + } + ++static void ++on_rfkill_proxy_properties_changed_cb (GDBusProxy *proxy, ++ GVariant *changed_properties, ++ GStrv invalidated_properties, ++ CcWifiPanel *self) ++{ ++ g_debug ("Rfkill properties changed"); ++ ++ sync_airplane_mode_switch (self); ++} ++ + static void + rfkill_proxy_acquired_cb (GObject *source_object, + GAsyncResult *res, +@@ -436,6 +447,12 @@ rfkill_proxy_acquired_cb (GObject *source_object, + + self->rfkill_proxy = proxy; + ++ g_signal_connect_object (proxy, ++ "g-properties-changed", ++ G_CALLBACK (on_rfkill_proxy_properties_changed_cb), ++ self, ++ 0); ++ + sync_airplane_mode_switch (self); + } + +diff --git a/panels/network/wifi.ui b/panels/network/wifi.ui +index a3eab3889..c0f8a06b1 100644 +--- a/panels/network/wifi.ui ++++ b/panels/network/wifi.ui +@@ -4,294 +4,306 @@ +