From 8321ef62564888d54e62bd90f27b60d971b28acb Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 15 Sep 2022 17:51:34 +0200 Subject: [PATCH] Backport a fix for initial setup session input sources sorting (#2124043) --- 2487.patch | 36 ++++++++++++++++++++++++++++++++++++ gnome-shell.spec | 10 +++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 2487.patch diff --git a/2487.patch b/2487.patch new file mode 100644 index 0000000..85fb95d --- /dev/null +++ b/2487.patch @@ -0,0 +1,36 @@ +From 5e3353ef22f84d3f61d494e3171f5d4295308a6c Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Wed, 14 Sep 2022 20:20:14 +0200 +Subject: [PATCH] status: Use fixed sorting of input sources on empty MRU + +When updating the MRU sources if there was no prior MRU, we want +to go with the unmodified list of sources in visibility order. + +However iterating over object properties happens in an undetermined +order, so the initial MRU list ends up picking a value at random. + +In order to prefer the sources list in the same order than they +appear in the menu if there was no prior MRU, order the keys +when accessing it and building the initial list of sources. + +Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5873 +--- + js/ui/status/keyboard.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js +index 76a42f6bd7..65b3962731 100644 +--- a/js/ui/status/keyboard.js ++++ b/js/ui/status/keyboard.js +@@ -492,7 +492,7 @@ var InputSourceManager = class extends Signals.EventEmitter { + + _updateMruSources() { + let sourcesList = []; +- for (let i in this._inputSources) ++ for (let i of Object.keys(this._inputSources).sort((a, b) => a - b)) + sourcesList.push(this._inputSources[i]); + + this._keyboardManager.setUserLayouts(sourcesList.map(x => x.xkbId)); +-- +GitLab + diff --git a/gnome-shell.spec b/gnome-shell.spec index dd6ae19..32315e8 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -2,7 +2,7 @@ Name: gnome-shell Version: 43~rc -Release: 2%{?dist} +Release: 3%{?dist} Summary: Window management and application launching for GNOME License: GPLv2+ @@ -14,6 +14,11 @@ Source0: https://download.gnome.org/sources/gnome-shell/42/%{name}-%{tarb # https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2472 Patch0: 2472.patch +# Backported from upstream +# https://bugzilla.redhat.com/show_bug.cgi?id=2121110 +# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2487 +Patch1: 2487.patch + # Replace Epiphany with Firefox in the default favourite apps list Patch10001: gnome-shell-favourite-apps-firefox.patch @@ -236,6 +241,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %{_mandir}/man1/gnome-shell.1* %changelog +* Thu Sep 15 2022 Kalev Lember - 43~rc-3 +- Backport a fix for initial setup session input sources sorting (#2124043) + * Tue Sep 06 2022 Kalev Lember - 43~rc-2 - Backport upstream fix to fix boot options (#2124043)