<div dir="ltr">Reviewed-By: Mike Blumenkrantz <<a href="mailto:zmike@osg.samsung.com">zmike@osg.samsung.com</a>><br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 13, 2016 at 2:18 PM Olivier Fourdan <<a href="mailto:ofourdan@redhat.com">ofourdan@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just a quick note, not that it matters much, but this should have been v7, not v6, I got confused with the numbering of iterations :)<br>
<br>
Cheers,<br>
Olivier<br>
<br>
----- Original Message -----<br>
> Some application may wish to restrict their window in size, but<br>
> xdg-shell has no mechanism for the client to specify a maximum or<br>
> minimum size.<br>
><br>
> As a result, the compositor may try to maximize or fullscreen a window<br>
> while the client would not allow for the requested size.<br>
><br>
> Add new requests "set_max_size" and "set_min_size" to xdg-shell so that<br>
> the client can tell the compositor what would be its smallest/largest<br>
> acceptable size, and that the compositor can decide if maximize or<br>
> fullscreen is achievable, draw an accurate animation, etc.<br>
><br>
> Signed-off-by: Olivier Fourdan <<a href="mailto:ofourdan@redhat.com" target="_blank">ofourdan@redhat.com</a>><br>
> Bugzilla: <a href="https://bugzilla.gnome.org/show_bug.cgi?id=764413" rel="noreferrer" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=764413</a><br>
> ---<br>
> v2: Rename the request to "set_preferred_max_size",<br>
> add "set_preferred_min_size" as well<br>
> v3: Rebase above patch 72427 in branch xdg-shell-unstable-v6<br>
> Rephrase description to clarify the unscaled size and using 0 to<br>
> reset back the preferred size to an unspecified state<br>
> v4: Patch the correct xml file (v6, not v5 <facepalm>)<br>
> Fix multiple mismatch of min/max in the description<br>
> Remove mention of "unscaled", specify window geometry coordinates<br>
> and refer to set_window_geometry.<br>
> v5: Fix typos and remove "preferred" from the name and description as<br>
> requested by several people on the ML and irc.<br>
> v6: Specify the requests are double-buffered and require a commit,<br>
> rephrase the values never set as suggested by Jasper, state<br>
> that min > max is an invalid state and result in a protocol error<br>
> as suggested by Bill, Yong and Jonas.<br>
> Specify that width/height values must be greater than or equal to<br>
> zero as discussed with Mike.<br>
><br>
> unstable/xdg-shell/xdg-shell-unstable-v6.xml | 74<br>
> ++++++++++++++++++++++++++++<br>
> 1 file changed, 74 insertions(+)<br>
><br>
> diff --git a/unstable/xdg-shell/xdg-shell-unstable-v6.xml<br>
> b/unstable/xdg-shell/xdg-shell-unstable-v6.xml<br>
> index 3fc7d42..eba31ce 100644<br>
> --- a/unstable/xdg-shell/xdg-shell-unstable-v6.xml<br>
> +++ b/unstable/xdg-shell/xdg-shell-unstable-v6.xml<br>
> @@ -489,6 +489,80 @@<br>
> <arg name="states" type="array"/><br>
> </event><br>
><br>
> + <request name="set_max_size"><br>
> + <description summary="set the maximum size"><br>
> + Set a maximum size for the window.<br>
> +<br>
> + The client can specify a maximum size so that the compositor does<br>
> + not try to configure the window beyond this size.<br>
> +<br>
> + The width and height arguments are in window geometry coordinates.<br>
> + See set_window_geometry.<br>
> +<br>
> + Values set in this way are double-buffered. They will get applied<br>
> + on the next commit.<br>
> +<br>
> + The compositor can use this information to allow or disallow<br>
> + different states like maximize or fullscreen and draw accurate<br>
> + animations.<br>
> +<br>
> + Similarly, a tiling window manager may use this information to<br>
> + place and resize client windows in a more effective way.<br>
> +<br>
> + If never set, or a value of zero in the request, means that the<br>
> + client has no expected maximum size in the given dimension.<br>
> + As a result, a client wishing to reset the maximum size<br>
> + to an unspecified state can use zero for width and height in the<br>
> + request.<br>
> +<br>
> + Requesting a maximum size to be smaller than the minimum size of<br>
> + a surface is illegal and will result in a protocol error.<br>
> +<br>
> + The width and height must be greater than or equal to zero. Using<br>
> + strictly negative values for width and height will result in a<br>
> + protocol error.<br>
> + </description><br>
> + <arg name="width" type="int"/><br>
> + <arg name="height" type="int"/><br>
> + </request><br>
> +<br>
> + <request name="set_min_size"><br>
> + <description summary="set the minimum size"><br>
> + Set a minimum size for the window.<br>
> +<br>
> + The client can specify a minimum size so that the compositor does<br>
> + not try to configure the window below this size.<br>
> +<br>
> + The width and height arguments are in window geometry coordinates.<br>
> + See set_window_geometry.<br>
> +<br>
> + Values set in this way are double-buffered. They will get applied<br>
> + on the next commit.<br>
> +<br>
> + The compositor can use this information to allow or disallow<br>
> + different states like maximize or fullscreen and draw accurate<br>
> + animations.<br>
> +<br>
> + Similarly, a tiling window manager may use this information to<br>
> + place and resize client windows in a more effective way.<br>
> +<br>
> + If never set, or a value of zero in the request, means that the<br>
> + client has no expected minimum size in the given dimension.<br>
> + As a result, a client wishing to reset the minimum size<br>
> + to an unspecified state can use zero for width and height in the<br>
> + request.<br>
> +<br>
> + Requesting a minimum size to be larger than the maximum size of<br>
> + a surface is illegal and will result in a protocol error.<br>
> +<br>
> + The width and height must be greater than or equal to zero. Using<br>
> + strictly negative values for width and height will result in a<br>
> + protocol error.<br>
> + </description><br>
> + <arg name="width" type="int"/><br>
> + <arg name="height" type="int"/><br>
> + </request><br>
> +<br>
> <request name="set_maximized"><br>
> <description summary="maximize the window"><br>
> Maximize the surface.<br>
> --<br>
> 2.5.5<br>
><br>
><br>
</blockquote></div>