[RFC weston] libweston: Do not include subsurfaces with NULL buffer in bounding box

Daniel Stone daniel at fooishbar.org
Mon Dec 4 21:37:38 UTC 2017

Hi Philipp,

On 28 July 2017 at 15:41, Philipp Kerling <pkerling at casix.org> wrote:
> I was pondering how to remove the window decorations of my application
> (which live in subsurfaces) when going full screen without flickering.
> At first I just destroyed the surfaces, but that lead to flicker
> (window without decoration will appear for one frame before the full
> screen application is displayed) since subsurface destruction is not
> specified to be synchronized to the commit of the main surface.
> Then I tried attaching a NULL wl_buffer to the surfaces. This works and
> does not flicker, but it has the problem that weston will disconnect my
> application when going to full screen for violating the configured
> xdg_shell buffer size. The reason seems to be that attaching a NULL
> wl_buffer does not reset the surface size and
> weston_surface_get_bounding_box still thinks that the surface has the
> prior size.
> The patch fixes this by checking explicitly for the buffer and is
> confirmed to fix the issue, but I am not sure whether this is the right
> solution. Maybe surface->width and surface->height should be set to 0
> anyway?

Hm. Yes, it does seem like the width/height should be 0, which is
undefined but not disallowed by the subsurface spec. I have no idea if
this would work with Mutter in particular, which had problems
implementing that for top-levels.

In any case, perhaps one way you could do it would be to stack the
decoration subsurfaces below your primary surface before committing
your fullscreen buffer. It's ugly, but does seem like it should work


More information about the wayland-devel mailing list