diff --git a/0001-st-icon-Ensure-icons-are-updated-if-theme-node-is-in.patch b/0001-st-icon-Ensure-icons-are-updated-if-theme-node-is-in.patch new file mode 100644 index 0000000..96f5882 --- /dev/null +++ b/0001-st-icon-Ensure-icons-are-updated-if-theme-node-is-in.patch @@ -0,0 +1,62 @@ +From 2bcc6c09edcdfa9929e8c3b4c3ce7ec652b0ad46 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= +Date: Wed, 22 Sep 2021 23:37:16 +0200 +Subject: [PATCH] st/icon: Ensure icons are updated if theme node is invalid + +Icons that are changed while an actor is not mapped may not have a theme +node associated with, and thus we'd end up not updating them at all. +In fact we return early in st_update_icon(), and this was not an issue +until commit 0b1dfbf6f3f, because we'd end up to update the icon anyways +once the style was changed (and so with a valid theme node), but since +such change we might not updating the icon if no theme detail changed. + +To prevent this, add a flag to require an icon update when the theme +changed, if no successfully update happened earlier. + +Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4568 +Part-of: +--- + src/st/st-icon.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/st/st-icon.c b/src/st/st-icon.c +index 71ba1b6b3..876aa9bbb 100644 +--- a/src/st/st-icon.c ++++ b/src/st/st-icon.c +@@ -59,6 +59,7 @@ struct _StIconPrivate + gint theme_icon_size; /* icon size from theme node */ + gint icon_size; /* icon size we are using */ + GIcon *fallback_gicon; ++ gboolean needs_update; + + StIconColors *colors; + +@@ -253,7 +254,7 @@ st_icon_style_changed (StWidget *widget) + + should_update |= st_icon_update_icon_size (self); + +- if (should_update) ++ if (priv->needs_update || should_update) + st_icon_update (self); + + ST_WIDGET_CLASS (st_icon_parent_class)->style_changed (widget); +@@ -487,6 +488,8 @@ st_icon_update (StIcon *icon) + return; + } + ++ priv->needs_update = TRUE; ++ + theme_node = st_widget_peek_theme_node (ST_WIDGET (icon)); + if (theme_node == NULL) + return; +@@ -525,6 +528,7 @@ st_icon_update (StIcon *icon) + priv->icon_size / paint_scale, + paint_scale, + resource_scale); ++ priv->needs_update = FALSE; + + if (priv->pending_texture) + { +-- +2.32.0 + diff --git a/gnome-shell.spec b/gnome-shell.spec index 636b761..021a9e8 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -2,7 +2,7 @@ Name: gnome-shell Version: 41.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Window management and application launching for GNOME License: GPLv2+ @@ -16,6 +16,11 @@ Patch1: gnome-shell-favourite-apps-firefox.patch # https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1993 Patch2: 0001-inputMethod-Clear-preeditStr-before-reset.patch +# Fix wrong OSD icons displaying after the first +# https://bugzilla.redhat.com/show_bug.cgi?id=2011872 +# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1983 +Patch3: 0001-st-icon-Ensure-icons-are-updated-if-theme-node-is-in.patch + # Some users might have a broken PAM config, so we really need this # downstream patch to stop trying on configuration errors. Patch10005: 0001-gdm-Work-around-failing-fingerprint-auth.patch @@ -234,6 +239,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %{_mandir}/man1/gnome-shell.1* %changelog +* Thu Oct 07 2021 Adam Williamson - 41.0-3 +- Backport MR #1983 to fix wrong OSD icons (#2011872) + * Tue Oct 05 2021 Kalev Lember - 41.0-2 - Backport upstream patch to fix scrolling to incorrect positions