[PATCH wayland-protocols 1/3] xdg-shell: Don't require the client to obay configure sizes

Quentin Glidic sardemff7+wayland at sardemff7.net
Wed Jul 20 09:02:01 UTC 2016


On 15/07/2016 11:37, Jonas Ådahl wrote:
> Some clients cannot obay arbitrary dimensions configured via
> xdg_toplevel.configure. For example, a client surface could require to
> have a certain aspect ratio, or not even be able to resize at all.
>
> Prior to this patch, such clients could not be implemented correctly, as
> the compositor is allowed to ignore the max/min size limits set by the
> client, resulting in the client either having to abort itself or being
> disconnected by the compositor when it disobayed the mandated
> configuration.
>
> With this change, compositors can up front make the decision to either
> disconnect a client that will not be able to resize to a certain size,
> or deal with it in some way, such as adding padding or scaling.
>
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
> ---

As commented on IRC, NAK from me here.
I see the xdg_toplevel capabilities as a nicer answer to the issue.

My rationale:
The "fullscreen" and "maximized" state should be complete features, not 
something the client can half-implement. If a client claims to support 
them, it must obey the compositor as no other component will know better 
which size will fit, but only the client knows how to fill the space 
(e.g. padding with the background colour for a terminal, instead of dumb 
black, which would looks weird if the terminal uses white as background).

Cheers,


>  unstable/xdg-shell/xdg-shell-unstable-v6.xml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/unstable/xdg-shell/xdg-shell-unstable-v6.xml b/unstable/xdg-shell/xdg-shell-unstable-v6.xml
> index 8da9c57..862e664 100644
> --- a/unstable/xdg-shell/xdg-shell-unstable-v6.xml
> +++ b/unstable/xdg-shell/xdg-shell-unstable-v6.xml
> @@ -690,13 +690,13 @@
>        <entry name="maximized" value="1" summary="the surface is maximized">
>  	<description summary="the surface is maximized">
>  	  The surface is maximized. The window geometry specified in the configure
> -	  event must be obeyed by the client.
> +	  event should be obeyed by the client.
>  	</description>
>        </entry>
>        <entry name="fullscreen" value="2" summary="the surface is fullscreen">
>  	<description summary="the surface is fullscreen">
>  	  The surface is fullscreen. The window geometry specified in the configure
> -	  event must be obeyed by the client.
> +	  event should be obeyed by the client.
>  	</description>
>        </entry>
>        <entry name="resizing" value="3" summary="the surface is being resized">
>


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list