Vai al contenuto

Gnome alt-tab scroll workaround

Pubblicato:

Nothing is perfect in this world, and even a well designed project, like the Gnome Desktop Environment, can still be affected by bugs. What I don’t really understand, though, is how such an annoying and, unfortunately pretty easy to reproduce misbehavior can still be present after who knows how many versions of the software and a lot of issues opened.

The problem

The offender is the action of scrolling the mouse wheel after a simple alt-tab switch between two different windows. If, god forbid, you had scrolled on the previous window, as soon as you try to do the same on the new one, the momentum that, for some reason, appear to be stored inside your mouse will be unleashed, making you jump to a random position of the page you are on. As one can imagine, it can be really annoying, especially for a programmer who is constantly alt-tabbing (anc copy-pasting) between the editor and the browser. Having to scroll back to where you were every time is a waste of time and a source of frustration.

The solution

Once I was fed up enough, I started looking online for a solution. Apparently I was not the only person affected by this bug and someone had found a workaround. Taiki Sugawara has published a Gnome extension. Since the original project has not been updated to work with the latest versions of Gnome, I have to rely on its fork, developed by Lucas Emanuel Resck.

Installation

The steps to install the extension are pretty straightforward, and listed on the README of the project.

From the Gnome Extensions website

Just go the official Gnome Extensions website. You will find the page of the extension, where you can install it with a simple click, provided you have all the necessary chrome extensions installed.

From the source

Otherwise, you can install it from the source.

git clone https://github.com/lucasresck/gnome-shell-extension-alt-tab-scroll-workaround.git
cd gnome-shell-extension-alt-tab-scroll-workaround
make install

Note

If you are using a version of Gnome not yet ufficially supported by the extension, you may need to switch the current branch to another one, like develop, before running make install.

You will need to restart the Gnome Shell for the changes to take effect. Make sure to save all your work and close all the open applications before doing so. You can restart Gnome by pressing Alt+F2 and typing r in the prompt that will appear. Otherwise, a good old reboot will do the trick.

If everything went fine, you should be able to see and enable the extension from the Gnome Extensions app, if it was not already enabled.