The Accidental Desktop Shift
Ubuntu Linux (using the default GNOME desktop environment) utilizes a virtual desktop system called “Workspaces.” By default, these workspaces are arranged dynamically and accessed via the Activities overview. However, if you are using specific GNOME Shell Extensions to manage workspaces (such as the popular “Workspace Matrix” or specific Dock configurations), a feature called “workspace switching on hover” might be enabled. This feature causes your entire screen to slide to a completely different virtual desktop simply because your mouse cursor lingered too close to the edge of the screen or hovered over a workspace indicator in the top panel. This creates a jarring, disorienting experience when you are simply trying to close a maximized window or access an application menu.
How to Disable Hover Switching via GNOME Extensions
Because hover-to-switch is not a native behavior of the vanilla Ubuntu GNOME desktop, the culprit is almost always a third-party extension you have installed or a tweak applied by a custom Ubuntu derivative.
1. Open the Extensions application on your Ubuntu system. (If you don’t have it installed, open your terminal and run sudo apt install gnome-shell-extension-prefs).
2. Review the list of active extensions.
3. If you use an extension like Dash to Dock, click the gear icon next to it to open its settings. Navigate to the “Behavior” tab and look for any option related to “Switch workspaces by scrolling or hovering” and disable it.
4. If you use an extension like Workspace Indicator, open its settings and disable the option that allows switching workspaces by hovering over the indicator in the top panel.
5. If you use a custom edge-screen extension (like “CustomCorner”), disable the trigger action associated with workspace navigation.
How to Disable Edge Scrolling via dconf Editor
If you cannot isolate the specific extension, or if the behavior is tied to a deeper system setting regarding mouse edge-scrolling, you can forcibly disable it using the `dconf` database editor.
1. Open your terminal.
2. Install the dconf-editor tool if you don’t already have it: sudo apt install dconf-editor
3. Launch the application by typing dconf-editor and pressing Enter.
4. Read the “I’ll be careful” warning and click accept.
5. Navigate through the folder tree to the following path: org > gnome > desktop > wm > preferences.
6. Look for a key that might be related to edge navigation or workspace switching (depending on the specific tweaks applied to your system). If you find a key relating to edge-tiling or edge-switching that you suspect is causing the issue, toggle its value to false.
However, simply finding and disabling the responsible GNOME Extension (Step 1) resolves this annoying behavior 99% of the time.