Skip to content

windowManager: detect change to a non-existent WS

When using dynamic workspaces, it is possible to try to change to a non-existent one if the user defines hotkeys for changing to desktop 1, 2, 3... This case is not detected, and gnome shell shows an error:

JS ERROR: TypeError: workspace is null
actionMoveWorkspace@resource:///org/gnome/shell/ui/windowManager.js:2130:13
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
_showWorkspaceSwitcher@resource:///org/gnome/shell/ui/windowManager.js:2104:13
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22

This patch adds a check before trying to change the workspace, to avoid switching to a non-existent one.

!365 (merged)

Edited by Rastersoft

Merge request reports