soften xdg-shell fullscreen constraint on geometry
rawoul at gmail.com
Wed Nov 15 14:30:44 UTC 2017
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 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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wayland-devel