Hi there,
I’m trying to understand the expected behaviour of focus changes in a dual-monitor/workspace setup, with the aim of reporting a bug either here in gnome-shell or in the gnome-shell-wsmatrix extension.
My setup:
- Left monitor (LM): Multiple workspaces, either vanilla gnome-shell or gnome-shell-wsmatrix
- Right monitor (RM): Single workspace
Scenario:
LM-left | LM-center | LM-right | RM |
---|---|---|---|
app1 |
(empty) | app2 |
app3 |
^ start | ^ end |
- Changing workspaces from LM-Left (start) to LM-right (end), thereby hovering over LM-center
- It’s important to note that LM-center is empty, while RM contains another application
app3
- While shifting over LM-center (not releasing the keys though),
app3
receives focus, which is to be expected and correct, as far as I can tell. Continue shifting to LM-right, sometimesapp3
releases its focus forapp2
, sometimes it doesn`t.
Expectation:
-
app2
on LM-right always holds focus
Problem:
-
Sometimes,
app3
on RM keeps the focus. This is almost certainly not the expected result, given that the user actively changed to a workspace that contains an application, andapp3
only entered the mix because LM-center is empty.
From observation, there seems to be a correlation to the ‘age’ of app3
and to the time when it last had focus. E.g. if app3
has had focus recently, it’s less likely to release focus to app2
. However, I’m unable to reproduce a deterministic result. I’m also not sure if the type of application matters, I seem to get different results for e.g. all apps being firefox instances vs. mix-and-match different applications.
Can someone clarify or point me to documentation/source code that helps to understand the expected behaviour?
Reference:
- My System: gnome-shell 3.36.4 on Ubuntu 20.04 LTS
- Project: https://github.com/mzur/gnome-shell-wsmatrix
- Relevant discussion: https://github.com/mzur/gnome-shell-wsmatrix/issues/141