Bug 69443

Summary: Child windows of fullscreen windows appear behind the fullscreen window in Xwayland
Product: Wayland Reporter: nerdopolis1
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: shell: Ensure transient surfaces are included in the layer of their parent
shell: Ensure transient surfaces are included in the layer of their parent (updated)

Description nerdopolis1 2013-09-16 21:41:34 UTC
I don't know if this is weston thing, or not actually. There seems to be no way to test a child window, such as a menu with a native fullscreen weston client

It seems that the fullscreen Plasma wallpaper is positioned in the proper coordinates, Weston treats it like a fullscreen window, and when I rightclick on it for the menu properties the menu properties appear on the bottom, when it is active.

I would file another bug for the issue that the Wallpaper window is set to appear on top of all windows, but I don't know if the wayland protocol, or if there is a shell protocol that supports stay on top / stay on bottom yet.
Comment 1 Philip Withnall 2013-11-05 14:50:40 UTC
This looks like a bug in shell.c, where the layer of all fullscreen surfaces is stacked above the layer of normal surfaces. Transient or popup surfaces which are transient for a fullscreen surface are included in the latter layer — and are hence stacked below the fullscreen layer.
Comment 2 Philip Withnall 2013-11-05 14:52:57 UTC
Created attachment 88701 [details] [review]
shell: Ensure transient surfaces are included in the layer of their parent

This seems to fix it for me. I’ve tested it with the broken application and with gedit, but with nothing else. Suggestions for better ways to test it are welcome.
Comment 3 Philip Withnall 2013-11-05 15:09:44 UTC
Created attachment 88703 [details] [review]
shell: Ensure transient surfaces are included in the layer of their parent (updated)

Updated to use weston_view_geometry_dirty() instead of weston_surface_damage().
Comment 4 Daniel Stone 2013-11-06 14:40:20 UTC
(In reply to comment #3)
> Created attachment 88703 [details] [review] [review]
> shell: Ensure transient surfaces are included in the layer of their parent
> (updated)
> 
> Updated to use weston_view_geometry_dirty() instead of
> weston_surface_damage().

This should track the layer the transient-for (parent) surface is in, rather than unconditionally slamming all transients into the fullscreen layer.  Else fullscreen windows would be obscured by transients of non-fullscreen windows.
Comment 5 Kristian Høgsberg 2013-11-07 01:11:50 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created attachment 88703 [details] [review] [review] [review]
> > shell: Ensure transient surfaces are included in the layer of their parent
> > (updated)
> > 
> > Updated to use weston_view_geometry_dirty() instead of
> > weston_surface_damage().
> 
> This should track the layer the transient-for (parent) surface is in, rather
> than unconditionally slamming all transients into the fullscreen layer. 
> Else fullscreen windows would be obscured by transients of non-fullscreen
> windows.

Yeah, sounds like you found the root cause of the problem here, but we do need to be smarted about moving transients in and out of the fullscreen layer along with the parent.
Comment 6 Philip Withnall 2013-11-25 18:06:32 UTC
Radically different patch set posted to the mailing list:
http://lists.freedesktop.org/archives/wayland-devel/2013-November/012195.html
Comment 7 Kristian Høgsberg 2014-01-03 06:41:46 UTC
With Philips stacking fixes and this:

commit d8a8860d7435f05825e1878225c20fdfeb05a1c0
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Jan 2 22:40:37 2014 -0800

    xwm: Handle WM_TRANSIENT_FOR
    
    Set up X windows that are transient for another window as transient
    surfaces in shell.c.  This keeps the transient windows on top of their
    parent as windows are raised, lowered for fullscreened.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=69443

I think we can now close this one.

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.