mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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 (cherry picked from commit 5e3353ef22f84d3f61d494e3171f5d4295308a6c)
This commit is contained in:
parent
5a4b868749
commit
ee05ecf3d8
1 changed files with 1 additions and 1 deletions
|
|
@ -488,7 +488,7 @@ var InputSourceManager = class {
|
|||
|
||||
_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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue