mzur / gnome-shell-wsmatrix

GNOME shell extension to arrange workspaces in a two-dimensional grid with workspace thumbnails
GNU General Public License v3.0
469 stars 60 forks source link

No window in focus after switching workspaces #250

Open dseomn opened 1 year ago

dseomn commented 1 year ago

Recently, some of the times when I switch workspaces with a keyboard shortcut, it looks like there's no window in focus. It used to focus whichever window was last focused in the workspace I just switched to, I think. I'm not positive this extension is the issue, but it does seem to only happen when I have this extension enabled.

Versions: gnome-shell-wsmatrix 7037a9ee6f39d63ed0fb8ed11d01d4f183cec8b5 gnome-shell 43.3-2 (from Debian)

Settings:

$ dconf dump /org/gnome/shell/extensions/wsmatrix/
[/]
multi-monitor=true
num-columns=4
num-rows=3
popup-timeout=0
show-workspace-names=false
mzur commented 1 year ago

Can anyone provide steps to reproduce this?

esauvisky commented 1 year ago

I can confirm this is happening and indeed it only happens when wsmatrix is enabled. This has begun recently, probably after gnome-shell 43.3.

I use pop-shell with window hints and in the video below you can clearly see that after switching workspaces, focus changes properly to the window in the foreground and then quickly switches back to the last focused window.

https://user-images.githubusercontent.com/18354658/229198585-0eb6dcd4-19a9-4b66-ab09-a13512ff4014.mp4

Unfortunately I still didn't figure out a way to reproduce, but will do some research given I'm not the only one affected.

mzur commented 1 year ago

I couldn't reproduce this so far with GNOME 43.4 in Arch. It seems like you both have popup-timeout=0 or don't display the popup at all. Does anything change if you let the popup show? What happens id you disable the second monitor (if you have one)?

dseomn commented 1 year ago

Ooh, good call, that seems relevant. I just changed popup-timeout to 300 for a bit, and didn't see this bug at all. When I switched workspaces, it looked like no window had focus while the popup was still open. But once the popup closed, the right window had focus. I don't have a second monitor.

mzur commented 1 year ago

Since I didn't see this in GNOME 43.4 maybe we can wait until this version lands in Debian and you can see if the issue is still there. Maybe the issue is only present in GNOME 43.3.

nicjohnston commented 1 year ago

Since I didn't see this in GNOME 43.4 maybe we can wait until this version lands in Debian and you can see if the issue is still there. Maybe the issue is only present in GNOME 43.3.

Waiting for 43.4 works for me. I've been affected by this bug as well (43.3), but I'm running such a messed up version of Manjaro that I wouldn't even bother to try and gather debug info.

esauvisky commented 1 year ago

I couldn't reproduce this so far with GNOME 43.4 in Arch. It seems like you both have popup-timeout=0 or don't display the popup at all. Does anything change if you let the popup show? What happens id you disable the second monitor (if you have one)?

Managed to reproduce. I did not use 0 or disabled, but I was using a very small value (because of a different quirk in which you have to wait for the popup to despawn to be able to alt+tab to a different window), and after raising it to 500 was able to figure out how to reproduce. My hunch is that both quirks are related as well.

Will send a video with steps shortly

esauvisky commented 1 year ago

Fixed for me on 43.4. Sorry forgot about the video but the way to reproduce was:

esauvisky commented 1 year ago

@dseomn if you don't mind: do you also happen to use "Switch Windows Directly" as your main Alt+Tab/application switcher? image

Although 43.4 fixed the root issue, there's another smaller one that I'm trying to fix related to all this and knowing that would be helpful.

By the way what fixed it was mutter not gnome-shell

mzur commented 1 year ago

Thanks for the update. I'll tag this as an upstream issue then. Feel free to discuss the other issue and close when you are ready.

dseomn commented 1 year ago

@dseomn if you don't mind: do you also happen to use "Switch Windows Directly" as your main Alt+Tab/application switcher?

I use "switch windows" (not directly). And while looking at that settings page, I realized that apparently the settings I set via dconf aren't even shown fully in the UI. In case those settings are relevant:

$ dconf dump /org/gnome/desktop/wm/keybindings/
[/]
switch-applications=@as []
switch-applications-backward=@as []
switch-windows=['<Super>Tab', '<Alt>Tab']
switch-windows-backward=['<Shift><Super>Tab', '<Shift><Alt>Tab']
PabloKowalczyk commented 1 year ago

Same issue here: GNOME Shell 44.1 on Ubuntu 23.04 and wsmatrix v8.0.

ashishnitinpatil commented 1 year ago

Same issue: GNOME shell 44.3 on Ubuntu 23.04 (wsmatrix seems latest / Version: 40 as per gnome-extensions info).

$ dconf dump /org/gnome/shell/extensions/wsmatrix/
[/]
show-popup=true