Bug 74219 - Launching a client when there's a fullscreen surface doesn't show the new client
Summary: Launching a client when there's a fullscreen surface doesn't show the new client
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-30 11:57 UTC by Emilio Pozuelo Monfort
Modified: 2014-04-29 22:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Emilio Pozuelo Monfort 2014-01-30 11:57:49 UTC
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.
Comment 1 Pekka Paalanen 2014-04-17 07:22:32 UTC
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.
Comment 2 Pekka Paalanen 2014-04-17 07:23:41 UTC
Erm, I mean, "do not active or raise" instead of "show".
Comment 3 Manuel Bachmann 2014-04-17 07:36:01 UTC
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..
Comment 4 Kristian Høgsberg 2014-04-29 22:16:06 UTC
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
activate():

commit 6110d077772b2af0ac4701c4ac4620d4e1ad59f7
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Tue Apr 29 15:15:45 2014 -0700

    desktop-shell: Raise new windows over fullscreen apps
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=74219


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.