soften xdg-shell fullscreen constraint on geometry

Arnaud Vrac rawoul at gmail.com
Wed Nov 15 14:30:44 UTC 2017


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 ?

Regards,
-Arnaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20171115/5cd3c7ca/attachment.html>


More information about the wayland-devel mailing list