lucasresck / gnome-shell-extension-alt-tab-scroll-workaround

Quick fix to the bug where scrolling in one application is repeated in another when switching between them using Alt+Tab (e.g., VS Code and Chrome)
https://extensions.gnome.org/extension/5282/alttab-scroll-workaround/
GNU General Public License v3.0
253 stars 11 forks source link

Not working on Fedora 39 #37

Open ant1g opened 5 months ago

ant1g commented 5 months ago

Hello, I have desperately been trying to find a solution for the VSCode scroll jumping issue with my current setup. I have installed & enabled this extension but it doesn't solve the problem, neither for Alt + Tab nor hot corners...

Here is my setup:

$ cat /etc/os-release 
NAME="Fedora Linux"
VERSION="39 (Workstation Edition)"
ID=fedora

Gnome version:

$ gnome-shell --version
GNOME Shell 45.7

Extension version:

$ gnome-extensions info alt-tab-scroll-workaround@lucasresck.github.io
alt-tab-scroll-workaround@lucasresck.github.io
  Name: Alt+Tab Scroll Workaround
  Description: Quick fix to the bug where scrolling in one application is repeated in another when switching between them using Alt+Tab (e.g., VS Code and Chrome).
  Path: /home/antoine/.local/share/gnome-shell/extensions/alt-tab-scroll-workaround@lucasresck.github.io
  URL: https://github.com/lucasresck/gnome-shell-extension-alt-tab-scroll-workaround
  Version: 7
  State: INITIALIZED

No other relevant gnome extensions installed:

$ gsettings get org.gnome.shell enabled-extensions
['background-logo@fedorahosted.org', 'alt-tab-scroll-workaround@lucasresck.github.io']

VScode version:

$ code --version
1.90.0
89de5a8d4d6205e5b11647eb6a74844ca23d2573
x64

Brave version: Version 1.67.116 Chromium: 126.0.6478.71 (Official Build) unknown (64-bit)

lucasresck commented 5 months ago

Hi, @ant1g, thank you for reaching out.

From what you described, I would expect the extension to work well as it already supports GNOME 45. My only guess would be Fedora, but I think that debugging this is a little bit trickier.

Two things can be the cause of the problem: the extension is not working at all, or what the extension does doesn't help.

The extension works by moving the cursor to the same position when Alt+Tab is used, and this clears the scroll buffer. However, a similar approach also clears the buffer: moving the cursor to the status bar (top bar outside the window).

What happens if you move your cursor to the status bar and bring it back to the window before pressing Alt+Tab?

ant1g commented 4 months ago

Thanks for the feedback! I tried moving the cursor on the status bar and it works for Alt+Tab. However, it doesn't work for the hot corners shortcut (not sure if this is how it's called): when I press the windows/cmd key, it zooms out and presents me with a miniature version of all my open windows - when I click on the browser window after scrolling in VSCode for instance, then the scroll jump still happens there.

Qervas commented 4 months ago

@ant1g Fedora 39 for Chrome and VScode works fine. 😊 GNOME Shell 45.8.1 Linux fedora 6.9.12-100.fc39.x86_64 Google Chrome 127.0.6533.88 VScode 1.92.0

lucasresck commented 4 months ago

Hello, @ant1g and @Qervas, thank you for the feedback.

I tried moving the cursor on the status bar and it works for Alt+Tab.

@ant1g, it may be the case the cursor is not being "moved" (to the same position), or "moving" to the same position does not have an effect. In the latter case, it should be (really) easy to adapt the extension to move the cursor to the top status bar and back. In the former case, it is more difficult to help.

However, @Qervas pointed that the extension works in their setup. In this case, I would guess that your issue may have an external cause, e.g., another extension or windows manager that interferes with this extension.

Try searching for possible external causes. And let me know if you wanna try the extension adaptation solution, I would be happy to help.