This is trivial to reproduce:
- Open weston-terminal
- Make it fullscreen (f11)
- Launch a new weston-terminal
The old fullscreen weston-terminal loses focus, which is now on the new non-fullscreen terminal. However the new terminal can't be seen.
The problem here is that the fullscreen terminal is in the fullscreen layer, and the new terminal gets added to the workspace layer, so it's behind.
A possible solution is to call lower_fullscreen_layer() from places such as create_xdg_surface() and create_shell_surface(), however that would not be always correct as the new surface may just be a transient surface for the fullscreen client.
Another option is to take the "do not show a new window if there is a fullscreen window topmost" as the intended behavior, and instead fix the keyboard focus to stay on the fullscreen window.
This could be useful when you are playing a game, and don't want even new top-level windows to interrupt you.
Erm, I mean, "do not active or raise" instead of "show".
I second this opinion : a fullscreen surface is generally displayed on purpose (games, homescreens, panels...), it would be disturbing to have it "challenged" by any random client or popup window.
For the user to see what is going on behind, he can do "Mod-Tab" as a last resort e.g..
Normal applications won't be able to pop up and interrupt your fullscreen
window, but if you launch a new application, our behavior is to display it
on top off all apps, as if you alt-tabbed to it. This is what most window
managers do, as far as I know.
It boils down to just calling lower_fullscreen_layer() first thing in
Author: Kristian Høgsberg <email@example.com>
Date: Tue Apr 29 15:15:45 2014 -0700
desktop-shell: Raise new windows over fullscreen apps