[PATCH] xdg-shell: add set_max_size request

Olivier Fourdan ofourdan at redhat.com
Mon Apr 4 09:14:37 UTC 2016


Some application may wish to restrict their window in size, but
xdg-shell has no mecanism for the client to advertise such a maximimum
size.

As a result, the compositor may try to maximize or fullscreen a window
while the client would not allow for the requested size.

Add a new request "set_max_size" to xdg-shell so that the client can
tell the compositor which would be its largest acceptable size, so that
the compositor can decide if maximize or fullscreen makes sense, draw
an accurate animation, etc.

Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=764413
---
 unstable/xdg-shell/xdg-shell-unstable-v5.xml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/unstable/xdg-shell/xdg-shell-unstable-v5.xml b/unstable/xdg-shell/xdg-shell-unstable-v5.xml
index 542491f..e9e0f1d 100644
--- a/unstable/xdg-shell/xdg-shell-unstable-v5.xml
+++ b/unstable/xdg-shell/xdg-shell-unstable-v5.xml
@@ -462,6 +462,26 @@
       <arg name="height" type="int"/>
     </request>
 
+    <request name="set_max_size">
+      <description summary="set the window maximum size">
+        The client can set a maximum size to tell the compositor what would
+        be the largest acceptable size of a surface.
+
+        The compositor can use this information to allow or disallow the
+        maximized or fullscreen state depending on the actual output size
+        for example, or draw a more accurate animation when transitionning
+        states.
+
+        If never set, the size is not limited by the client.
+
+        A value of zero for either width, height or both means that the
+        size is not limited for the given dimension.
+      </description>
+      <arg name="width" type="int"/>
+      <arg name="height" type="int"/>
+    </request>
+
+
     <request name="set_maximized">
       <description summary="maximize the window">
         Maximize the surface.
-- 
2.5.5



More information about the wayland-devel mailing list