mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2451>
This commit is contained in:
parent
6c56de82ea
commit
137c50b6dc
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue