From 6f08de816576ab73ba10fcdca7e1bbd582543b40 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 13:29:13 +0000 Subject: import gnome-shell-3.32.2-48.el8 --- diff --git a/SOURCES/0001-main-Unset-the-right-prevFocus-actor-after-the-focus.patch b/SOURCES/0001-main-Unset-the-right-prevFocus-actor-after-the-focus.patch new file mode 100644 index 0000000..c052297 --- /dev/null +++ b/SOURCES/0001-main-Unset-the-right-prevFocus-actor-after-the-focus.patch @@ -0,0 +1,49 @@ +From 0d95c2087aba7f0b07cb303c1f15d097b45f1b09 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Tue, 28 Apr 2020 23:26:11 +0200 +Subject: [PATCH] main: Unset the right prevFocus actor after the focus stack + got shifted +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When a modal that's not on top of the modalActorFocusStack gets popped, +we shift the focus stack as described in popModal() to ensure the chain +remains correct. That however destroys the association of a modal actor +and its prevFocus actor on the focus stack, because the prevFocus actors +are now moved to different entries of the stack. + +Now when a prevFocus actor gets destroyed, we don't handle that case +correctly and search for the modal actor that was associated with the +prevFocus actor before the stack was shifted, which means we end up +unsetting the wrong prevFocus actor. + +So fix that and search the stack for the prevFocus actor which is being +destroyed instead to unset the correct entry. + +Thanks to Florian Müllner for figuring out the actual issue and +proposing this fix. + +Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2446 +--- + js/ui/main.js | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/js/ui/main.js b/js/ui/main.js +index dd1d8463d..ca3dcaa3c 100644 +--- a/js/ui/main.js ++++ b/js/ui/main.js +@@ -486,7 +486,9 @@ function pushModal(actor, params) { + let prevFocusDestroyId; + if (prevFocus != null) { + prevFocusDestroyId = prevFocus.connect('destroy', () => { +- let index = _findModal(actor); ++ const index = modalActorFocusStack.findIndex( ++ record => record.prevFocus === prevFocus); ++ + if (index >= 0) + modalActorFocusStack[index].prevFocus = null; + }); +-- +2.35.1 + diff --git a/SOURCES/0001-shell-recorder-Restore-cursor-recording.patch b/SOURCES/0001-shell-recorder-Restore-cursor-recording.patch new file mode 100644 index 0000000..ffd31d1 --- /dev/null +++ b/SOURCES/0001-shell-recorder-Restore-cursor-recording.patch @@ -0,0 +1,28 @@ +From 3182ad73c8f88628cb51a96feba0fc32ce7f01c9 Mon Sep 17 00:00:00 2001 +From: Illya Klymov +Date: Mon, 8 Jul 2019 03:29:36 +0000 +Subject: [PATCH] shell-recorder: Restore cursor recording + +Due to changes introduced in 5357e0a1 cursor recording interaction with +magnifier was reversed. This fix restores original correct behavior +Related issue: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1208 +--- + src/shell-recorder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/shell-recorder.c b/src/shell-recorder.c +index 0203ecf1c..cf1cc336f 100644 +--- a/src/shell-recorder.c ++++ b/src/shell-recorder.c +@@ -465,7 +465,7 @@ recorder_record_frame (ShellRecorder *recorder, + + g_object_get (settings, "magnifier-active", &magnifier_active, NULL); + +- if (magnifier_active) ++ if (!magnifier_active) + recorder_draw_cursor (recorder, buffer); + } + +-- +2.35.1 + diff --git a/SOURCES/0001-status-volume-Hide-sliders-initially.patch b/SOURCES/0001-status-volume-Hide-sliders-initially.patch new file mode 100644 index 0000000..ab5a86e --- /dev/null +++ b/SOURCES/0001-status-volume-Hide-sliders-initially.patch @@ -0,0 +1,30 @@ +From 4e555e0efeb4b31918e199d29bee99b2a4ed1c8e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Wed, 11 May 2022 02:34:21 +0200 +Subject: [PATCH] status/volume: Hide sliders initially + +We update the visibility on state or stream changes, but those +changes may never happen if pipewire-pulse/pulseaudio isn't +available (for example when running as root). + +Hiding the sliders is preferable in that case to showing non-working +controls. +--- + js/ui/status/volume.js | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js +index d555b426e..ab5065683 100644 +--- a/js/ui/status/volume.js ++++ b/js/ui/status/volume.js +@@ -30,6 +30,7 @@ var StreamSlider = class { + this._control = control; + + this.item = new PopupMenu.PopupBaseMenuItem({ activate: false }); ++ this.item.actor.hide(); + + this._slider = new Slider.Slider(0); + +-- +2.35.1 + diff --git a/SOURCES/0002-background-rebuild-background-not-just-animation-on-.patch b/SOURCES/0002-background-rebuild-background-not-just-animation-on-.patch index de5f77a..3b436cb 100644 --- a/SOURCES/0002-background-rebuild-background-not-just-animation-on-.patch +++ b/SOURCES/0002-background-rebuild-background-not-just-animation-on-.patch @@ -1,8 +1,8 @@ -From 1a546d4df199f498b838efdccf081ada8ed1960b Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Tue, 15 Jan 2019 12:52:49 -0500 -Subject: [PATCH 2/4] background: rebuild background, not just animation on - resume +From f27c4224aa96975ae44641612f5fff3772f5c294 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 22 Aug 2022 13:06:05 +0200 +Subject: [PATCH] [PATCH 2/4] background: rebuild background, not just + animation on resume Previously, we would only refresh the animation on resume (to handle clock skew). @@ -14,7 +14,7 @@ so we should just do a full background change. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/background.js b/js/ui/background.js -index 06e038816..75b76a57e 100644 +index 2a404ae..dd11e3e 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -254,7 +254,7 @@ var Background = class Background { @@ -25,7 +25,7 @@ index 06e038816..75b76a57e 100644 + this.emit('changed'); }); - this._settingsChangedSignalId = this._settings.connect('changed', () => { + this._settingsChangedSignalId = -- -2.21.0 +2.35.3 diff --git a/SOURCES/defend-against-corrupt-notifications.patch b/SOURCES/defend-against-corrupt-notifications.patch new file mode 100644 index 0000000..9957a7b --- /dev/null +++ b/SOURCES/defend-against-corrupt-notifications.patch @@ -0,0 +1,145 @@ +From 7bdd1962213a37f6218fe15ea1a4062dd318672a Mon Sep 17 00:00:00 2001 +From: Will Thompson +Date: Wed, 28 Aug 2019 15:39:44 +0100 +Subject: [PATCH 1/2] global: Don't trust persistent/runtime state data + +An Endless OS system was found in the wild with a malformed +.local/share/gnome-shell/notifications. When deserialized in Python, +after passing trusted=True to g_variant_new_from_bytes(), the first +element of the first struct in the array looks like this: + + In [41]: _38.get_child_value(0).get_child_value(0) + Out[41]: GLib.Variant('s', '\Uffffffff\Uffffffff\Uffffffff\Uffffffff\Uffffffff') + +When deserialised in GJS, we get: + + gjs> v.get_child_value(0).get_child_value(0) + [object variant of type "s"] + gjs> v.get_child_value(0).get_child_value(0).get_string() + typein:43:1 malformed UTF-8 character sequence at offset 0 + @typein:43:1 + @:1:34 + +While g_variant_new_from_bytes() doesn't have much to say about its +'trusted' parameter, g_variant_new_from_data() does: + +> If data is trusted to be serialised data in normal form then trusted +> should be TRUE. This applies to serialised data created within this +> process or read from a trusted location on the disk (such as a file +> installed in /usr/lib alongside your application). You should set +> trusted to FALSE if data is read from the network, a file in the +> user's home directory, etc. + +Persistent state is read from the user's home directory, so it should +not be trusted. With trusted=False, the string value above comes out as +"". + +I don't have an explanation for how this file ended up being malformed. +I also don't have an explanation for when this started crashing: my +guess is that recent GJS became stricter about validating UTF-8 but I +could be wrong! + +https://gitlab.gnome.org/GNOME/gnome-shell/issues/1552 +--- + src/shell-global.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/shell-global.c b/src/shell-global.c +index 4b33778e0..33046f614 100644 +--- a/src/shell-global.c ++++ b/src/shell-global.c +@@ -1707,7 +1707,7 @@ load_variant (GFile *dir, + else + { + GBytes *bytes = g_mapped_file_get_bytes (mfile); +- res = g_variant_new_from_bytes (G_VARIANT_TYPE (property_type), bytes, TRUE); ++ res = g_variant_new_from_bytes (G_VARIANT_TYPE (property_type), bytes, FALSE); + g_bytes_unref (bytes); + g_mapped_file_unref (mfile); + } +-- +2.35.1 + + +From 13dcb3e4400b92a0d2f548e88b70b358240d462c Mon Sep 17 00:00:00 2001 +From: Will Thompson +Date: Wed, 28 Aug 2019 15:38:03 +0100 +Subject: [PATCH 2/2] notificationDaemon: Catch exceptions while loading + notifications + +An Endless OS system was found in the wild with a malformed +.local/share/gnome-shell/notifications which causes _loadNotifications() +to raise an exception. This exception was not previously handled and +bubbles all the way out to gnome_shell_plugin_start(), whereupon the +shell exit(1)s. The user could no longer log into their computer. + +Handle exceptions from _loadNotifications(), log them, and attempt to +continue. Ensure that this._isLoading is set to 'false' even on error, +so that future calls to _saveNotifications() can overwrite the (corrupt) +state file. + +https://gitlab.gnome.org/GNOME/gnome-shell/issues/1552 +--- + js/ui/notificationDaemon.js | 42 ++++++++++++++++++++----------------- + 1 file changed, 23 insertions(+), 19 deletions(-) + +diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js +index 4bdede841..dbe673b88 100644 +--- a/js/ui/notificationDaemon.js ++++ b/js/ui/notificationDaemon.js +@@ -749,29 +749,33 @@ var GtkNotificationDaemon = class GtkNotificationDaemon { + _loadNotifications() { + this._isLoading = true; + +- let value = global.get_persistent_state('a(sa(sv))', 'notifications'); +- if (value) { +- let sources = value.deep_unpack(); +- sources.forEach(([appId, notifications]) => { +- if (notifications.length == 0) +- return; +- +- let source; +- try { +- source = this._ensureAppSource(appId); +- } catch(e) { +- if (e instanceof InvalidAppError) ++ try { ++ let value = global.get_persistent_state('a(sa(sv))', 'notifications'); ++ if (value) { ++ let sources = value.deep_unpack(); ++ sources.forEach(([appId, notifications]) => { ++ if (notifications.length == 0) + return; +- throw e; +- } + +- notifications.forEach(([notificationId, notification]) => { +- source.addNotification(notificationId, notification.deep_unpack(), false); ++ let source; ++ try { ++ source = this._ensureAppSource(appId); ++ } catch (e) { ++ if (e instanceof InvalidAppError) ++ return; ++ throw e; ++ } ++ ++ notifications.forEach(([notificationId, notification]) => { ++ source.addNotification(notificationId, notification.deep_unpack(), false); ++ }); + }); +- }); ++ } ++ } catch (e) { ++ logError(e, 'Failed to load saved notifications'); ++ } finally { ++ this._isLoading = false; + } +- +- this._isLoading = false; + } + + _saveNotifications() { +-- +2.35.1 + diff --git a/SOURCES/fix-double-disposed-backgrounds.patch b/SOURCES/fix-double-disposed-backgrounds.patch new file mode 100644 index 0000000..7eebf77 --- /dev/null +++ b/SOURCES/fix-double-disposed-backgrounds.patch @@ -0,0 +1,101 @@ +From 49d066234f9f528122bb40c5144b40d8b19a0071 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 22 Aug 2022 12:52:19 +0200 +Subject: [PATCH] Background: Avoid double dispose and actors recreations + +Subject: [PATCH 1/2] background: Use Garbage Collector to dispose background: + +The same Meta.Background could be used by multiple instances of background +actors, and so should not be disposed when the actor using it is destroyed. + +Instead of calling `run_dispose` directly on it, just nullify the reference +on destroy method, leaving the job of doing the proper disposition to the +gabage collector that keeps the proper reference count on the Meta.Background. + +Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/501 + +https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/558 + +Subject: [PATCH 2/2] background: Group 'changed' signal emission + +Background is monitoring the whole `org.gnome.desktop.background` gsettings keys +for changes connecting to the non-specialized 'changed' signal and re-emitting +this as-is. +This means that when the background is changed via control-center, we get +multiple 'changed' signal events from GSettings, and for each one of this we +recreate a Background and a BackgroundActor. + +Avoid this by using an idle to delay the emission of the 'changed' signal +grouping the events. + +https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/558 +--- + js/ui/background.js | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) + +diff --git a/js/ui/background.js b/js/ui/background.js +index 06e0388..2a404ae 100644 +--- a/js/ui/background.js ++++ b/js/ui/background.js +@@ -257,14 +257,15 @@ var Background = class Background { + this._refreshAnimation(); + }); + +- this._settingsChangedSignalId = this._settings.connect('changed', () => { +- this.emit('changed'); +- }); ++ this._settingsChangedSignalId = ++ this._settings.connect('changed', this._emitChangedSignal.bind(this)); + + this._load(); + } + + destroy() { ++ this.background = null; ++ + this._cancellable.cancel(); + this._removeAnimationTimeout(); + +@@ -288,6 +289,22 @@ var Background = class Background { + if (this._settingsChangedSignalId != 0) + this._settings.disconnect(this._settingsChangedSignalId); + this._settingsChangedSignalId = 0; ++ ++ if (this._changedIdleId) { ++ GLib.source_remove(this._changedIdleId); ++ this._changedIdleId = 0; ++ } ++ } ++ ++ _emitChangedSignal() { ++ if (this._changedIdleId) ++ return; ++ ++ this._changedIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { ++ this._changedIdleId = 0; ++ this.emit('changed'); ++ return GLib.SOURCE_REMOVE; ++ }); + } + + updateResolution() { +@@ -343,7 +360,7 @@ var Background = class Background { + if (changedFile.equal(file)) { + let imageCache = Meta.BackgroundImageCache.get_default(); + imageCache.purge(changedFile); +- this.emit('changed'); ++ this._emitChangedSignal(); + } + }); + this._fileWatches[key] = signalId; +@@ -699,7 +716,6 @@ var BackgroundManager = class BackgroundManager { + time: FADE_ANIMATION_TIME, + transition: 'easeOutQuad', + onComplete() { +- oldBackgroundActor.background.run_dispose(); + oldBackgroundActor.destroy(); + } + }); +-- +2.35.3 + diff --git a/SPECS/gnome-shell.spec b/SPECS/gnome-shell.spec index 762b958..da494e9 100644 --- a/SPECS/gnome-shell.spec +++ b/SPECS/gnome-shell.spec @@ -1,6 +1,6 @@ Name: gnome-shell Version: 3.32.2 -Release: 44%{?dist} +Release: 48%{?dist} Summary: Window management and application launching for GNOME Group: User Interface/Desktops @@ -62,26 +62,31 @@ Patch52: 0001-popupMenu-Handle-keypress-if-numlock-is-enabled.patch Patch53: 0001-theme-Update-window-preview-style.patch Patch54: warn-less.patch Patch55: 0001-networkAgent-add-support-for-SAE-secrets.patch +Patch56: 0001-main-Unset-the-right-prevFocus-actor-after-the-focus.patch +Patch57: defend-against-corrupt-notifications.patch +Patch58: 0001-status-volume-Hide-sliders-initially.patch +Patch59: 0001-shell-recorder-Restore-cursor-recording.patch # Backport JS invalid access warnings (#1651894, #1663171, #1642482, #1637622) -Patch57: fix-invalid-access-warnings.patch -Patch58: more-spurious-allocation-warnings.patch -Patch59: fix-some-js-warnings.patch +Patch60: fix-invalid-access-warnings.patch +Patch61: more-spurious-allocation-warnings.patch +Patch62: fix-some-js-warnings.patch +Patch63: fix-double-disposed-backgrounds.patch # Backport performance fixes under load (#1820760) -Patch60: 0001-environment-reduce-calls-to-g_time_zone_new_local.patch -Patch61: 0002-environment-Fix-date-conversion.patch -Patch62: 0003-shell-app-system-Monitor-for-icon-theme-changes.patch -Patch63: 0004-global-force-fsync-to-worker-thread-when-saving-stat.patch -Patch64: 0005-app-cache-add-ShellAppCache-for-GAppInfo-caching.patch -Patch65: 0006-js-Always-use-AppSystem-to-lookup-apps.patch +Patch70: 0001-environment-reduce-calls-to-g_time_zone_new_local.patch +Patch71: 0002-environment-Fix-date-conversion.patch +Patch72: 0003-shell-app-system-Monitor-for-icon-theme-changes.patch +Patch73: 0004-global-force-fsync-to-worker-thread-when-saving-stat.patch +Patch74: 0005-app-cache-add-ShellAppCache-for-GAppInfo-caching.patch +Patch75: 0006-js-Always-use-AppSystem-to-lookup-apps.patch # Stop screen recording on monitor changes (#1705392) -Patch70: 0001-screencast-Stop-recording-when-screen-size-or-resour.patch +Patch80: 0001-screencast-Stop-recording-when-screen-size-or-resour.patch # Backport OSK fixes (#1871041) -Patch75: osk-fixes.patch -Patch76: 0001-keyboard-Only-enable-keyboard-if-ClutterDeviceManage.patch +Patch85: osk-fixes.patch +Patch86: 0001-keyboard-Only-enable-keyboard-if-ClutterDeviceManage.patch # suspend/resume fix on nvidia (#1663440) Patch10001: 0001-background-refresh-after-suspend-on-wayland.patch @@ -275,6 +280,24 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %{_mandir}/man1/%{name}.1.gz %changelog +* Fri Aug 12 2022 Florian Müllner - 3.32.2-48 +- Fix warnings on double-disposed backgrounds + Resolves: #2116555 + +* Wed May 11 2022 Phil Wyett - 3.32.2-47 +- Restore missing cursor to screencast recordings + Resolves: #1993420 + +* Wed May 11 2022 Florian Müllner - 3.32.2-46 +- Hide volume sliders initially + Resolves: #1982779 + +* Thu Apr 21 2022 Florian Müllner - 3.32.2-45 +- Fix lock up when previous focus actor is destroyed during modal + Resolves: #2075231 +- Defend against corrupt notifications file + Resolves: #2078564 + * Fri Nov 26 2021 Florian Müllner - 3.32.2-44 - Fix more JS warnings Resolves: #2025940