gnome-shell-wsmatrix icon indicating copy to clipboard operation
gnome-shell-wsmatrix copied to clipboard

No window in focus after switching workspaces

Open dseomn opened this issue 2 years ago • 13 comments

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

dseomn avatar Mar 13 '23 00:03 dseomn

Can anyone provide steps to reproduce this?

mzur avatar Mar 30 '23 17:03 mzur

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.

esauvisky avatar Mar 31 '23 18:03 esauvisky

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)?

mzur avatar Apr 02 '23 18:04 mzur

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.

dseomn avatar Apr 02 '23 19:04 dseomn

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.

mzur avatar Apr 03 '23 06:04 mzur

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.

nicjohnston avatar Apr 04 '23 05:04 nicjohnston

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 avatar Apr 13 '23 12:04 esauvisky

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

  • Set a very short popup despawn time.
  • Switch from a workspace containing an Electron app to an adjacent one with a GTK3 window.
  • Wait for the modal to despawn.
  • Switch back to the previous workspace with the electron app.
  • You'll notice that the focus is on the GTK3 window still. You can press alt+space to check.

esauvisky avatar Apr 19 '23 03:04 esauvisky

@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

esauvisky avatar Apr 19 '23 04:04 esauvisky

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.

mzur avatar Apr 19 '23 07:04 mzur

@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']

dseomn avatar Apr 19 '23 16:04 dseomn

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

PabloKowalczyk avatar Jun 13 '23 08:06 PabloKowalczyk

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

ashishnitinpatil avatar Sep 23 '23 02:09 ashishnitinpatil