diff -Nru gnome-shell-42.4/debian/changelog gnome-shell-42.4/debian/changelog --- gnome-shell-42.4/debian/changelog 2022-08-12 05:58:27.000000000 +0800 +++ gnome-shell-42.4/debian/changelog 2022-09-14 14:57:57.000000000 +0800 @@ -1,3 +1,10 @@ +gnome-shell (42.4-0ubuntu0.22.04.2) jammy; urgency=medium + + * debian/patches: Apply fix for switching monitor with Super-P on desktop + (LP: #1984147) + + -- Yao Wei (魏銘廷) Wed, 14 Sep 2022 14:57:57 +0800 + gnome-shell (42.4-0ubuntu0.22.04.1) jammy; urgency=medium * New upstream release (LP: #1985304): diff -Nru gnome-shell-42.4/debian/patches/series gnome-shell-42.4/debian/patches/series --- gnome-shell-42.4/debian/patches/series 2022-08-12 05:58:27.000000000 +0800 +++ gnome-shell-42.4/debian/patches/series 2022-09-14 14:56:34.000000000 +0800 @@ -25,3 +25,4 @@ ubuntu/sessionMode-Add-support-for-configuring-an-icons-resource.patch ubuntu/main-Support-loading-multiple-Yaru-theme-variants.patch ubuntu/Revert-dash-Use-pin-instead-of-favorites.patch +ubuntu/switchMonitor-fix-initial-selection-on-desktop.patch diff -Nru gnome-shell-42.4/debian/patches/ubuntu/switchMonitor-fix-initial-selection-on-desktop.patch gnome-shell-42.4/debian/patches/ubuntu/switchMonitor-fix-initial-selection-on-desktop.patch --- gnome-shell-42.4/debian/patches/ubuntu/switchMonitor-fix-initial-selection-on-desktop.patch 1970-01-01 08:00:00.000000000 +0800 +++ gnome-shell-42.4/debian/patches/ubuntu/switchMonitor-fix-initial-selection-on-desktop.patch 2022-09-14 14:56:34.000000000 +0800 @@ -0,0 +1,33 @@ +From 137c50b6dc7d8a6eec844d7e2baf8aabb3680a89 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Yao=20Wei=20=28=E9=AD=8F=E9=8A=98=E5=BB=B7=29?= + +Date: Mon, 29 Aug 2022 16:45:05 +0800 +Subject: [PATCH] switchMonitor: Fix initial selection on desktop + +Due to !2056 the monitor config is 2 instead of 4 on the desktop. +However, the constant `Meta.MonitorSwitchConfigType.UNKNOWN` is fixed to +4, and may cause the initial selection to be out of index thus fail to +display the switcher. This replaces the above constant to the actual +length of the switcher items. + +Part-of: +--- + js/ui/switchMonitor.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/ui/switchMonitor.js b/js/ui/switchMonitor.js +index 10b4a50cde..a95c5fa9ad 100644 +--- a/js/ui/switchMonitor.js ++++ b/js/ui/switchMonitor.js +@@ -63,7 +63,7 @@ class SwitchMonitorPopup extends SwitcherPopup.SwitcherPopup { + + _initialSelection() { + let currentConfig = Meta.MonitorManager.get().get_switch_config(); +- let selectConfig = (currentConfig + 1) % Meta.MonitorSwitchConfigType.UNKNOWN; ++ let selectConfig = (currentConfig + 1) % this._items.length; + this._select(selectConfig); + } + +-- +GitLab +