soften xdg-shell fullscreen constraint on geometry
jadahl at gmail.com
Tue Nov 21 04:58:48 UTC 2017
On Wed, Nov 15, 2017 at 02:30:44PM +0000, Arnaud Vrac wrote:
> Hi all,
> Seeing Jonas effort to make xdg-shell stable, I'd like to clear something
> up before this is done.
> The set_fullscreen request documentation mentions:
> If the surface doesn't cover the whole output, the compositor will
> position the surface in the center of the output and compensate with
> black borders filling the rest of the output.
> On the other hand, the fullscreen enum state documentation mentions:
> The surface is fullscreen. The window geometry specified in the configure
> event must be obeyed by the client.
> While that is not contradictory, this would prevent a simple optimisation
> in embedded platforms, where you want to scale a surface fullscreen using
> wp_viewport, but keep its original aspect ratio (for a video, for example).
> In this case, to avoid a protocol error, you need to create a black surface
> with the fullscreen size, and center the original surface inside it using a
> subsurface. This might prevent direct rendering to a plane.
> Since the compositor needs to handle adding black borders and center the
> surface anyway, I think we could reword the fullscreen state description to
> the following:
> "The surface is fullscreen. At least one of the width and height properties
> specified in the configure event must be obeyed by the client."
> What do you think ?
Thanks a lot for bringing this up. I think it makes a lot of sense to
soften the restriction to make it possible for the type of optimization
you described. I sent a patch that changes the wording to try to word
things in a way aiming to make these types of optimizations possible,
even while not having a reliably rgb(0,0,0) background.
One difference from the wording you wrote bove is that I didn't add any
requirement for requiring at least one dimensions to be met; I didn't
see the point.
Anyhow, if you have a chance, please have a look at the patch, titled
"xdg-shell: Soften fullscreen geometry requirements".
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
More information about the wayland-devel