Unexpected pick of new focus window after close
Affected version
43.1, main
Steps to reproduce
- open multiple windows of the same app (nautilus, terminal, ...) on the same workspace
- switch to a window of a different application (say, the web browser) on the same workspace
- switch back to the first app (super+tab or clicking the app icon in the dash)
- close the current window
What happened
Step 3 will raise all windows of the app. However closing the window in step 4 will not switch to the "next" window, but to the window from step 2.
This is the result of picking the default focus window based on the MRU order instead of the stack after !2489 (merged).
I'm unsure how best to address that:
- gnome-shell could focus all the windows instead of only raising other app windows, but that seems a it wasteful if we know that we'll take focus away immediately again (also some potential for the dreaded "app is ready" notifications
😱 ) - we could split out a new move-to-head-of-mru-list method that shell can call when raising the windows
- same, but don't expose the mru manipulation method directly and instead add a "super raise" method for gnome-shell
Any other ideas?