> On Jul 15, 2016, at 4:00 AM, Jonas Ådahl <jad...@gmail.com> wrote:
> 
> The xdg_toplevel capabilities are meant to let the compositor know what
> configurations a client can be configured to. This is meant to make it
> possible to disallow a compositor to maximize, fullscreen etc a
> surface, which would otherwise mandate the client to configure the
> surface according to dimension in the xdg_toplevel.configure event.
> 
> This makes it possible to create non-resizable surfaces as well as
> surfaces with only a certain aspect ratio allowed, by making them
> un-fullscreen:able and un-maximize:able.
> 
> Signed-off-by: Jonas Ådahl <jad...@gmail.com>

This seems like a better strategy, making the client behavior and
compositor expectations part of the protocol. Other than the
entry -> request mistake that Quentin pointed out, this is

Reviewed-by: Yong Bakos <yba...@humanoriented.com>

yong



> ---
> 
> This is an alternative solution to the s/must/should/ patch.
> 
> I made a separate enum, because certain state enum entries make no sense to
> support or not, since they don't mandate anything (resize, activated so far).
> 
> 
> Jonas
> 
> unstable/xdg-shell/xdg-shell-unstable-v6.xml | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
> 
> diff --git a/unstable/xdg-shell/xdg-shell-unstable-v6.xml 
> b/unstable/xdg-shell/xdg-shell-unstable-v6.xml
> index 563e39b..73944a8 100644
> --- a/unstable/xdg-shell/xdg-shell-unstable-v6.xml
> +++ b/unstable/xdg-shell/xdg-shell-unstable-v6.xml
> @@ -734,6 +734,29 @@
>       </entry>
>     </enum>
> 
> +    <enum name="capabilities">
> +      <description summary="toplevel capabilities">
> +     Certain xdg_toplevel states mandate certain client capabilities. For
> +     example while a fullscreen:ed client is required to configure itself
> +     according to the dimension in the configure event, some clients may not
> +     have this ability due to various reasons.
> +      </description>
> +      <entry name="maximize" value="1"
> +          summary="the toplevel can be maximized"/>
> +      <entry name="fullscreen" value="2"
> +          summary="the toplevel can be fullscreened"/>
> +    </enum>
> +
> +    <entry name="set_capabilities">
> +      <description summary="set capabilities">
> +     Notify the compositor about what capabilities this xdg_toplevel
> +     supports. This request can only be issued once and if so must be done
> +     before the initial state is comitted. The default capabilities are no
> +     capabilities.
> +      </description>
> +      <arg name="caps" type="array" summary="array of toplevel 
> capabilities"/>
> +    </entry>
> +
>     <request name="set_max_size">
>       <description summary="set the maximum size">
>       Set a maximum size for the window.
> -- 
> 2.7.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to