[PATCH wayland v3] protocol: Add minimize/maximize protocol

Scott Moreau oreaus at gmail.com
Thu Mar 7 20:47:09 PST 2013

In order for clients to notify the compositor that they wish to be minimized, a
minimize request is needed. This can be used to minimize the surface when a
user clicks a minimize button for example.

The compositor needs a way to tell clients to maximize and unmaximize their
surfaces. The desktop shell client can ask the compositor to send a surface
an (un)maximize event, in response to a panel button for example.

The compositor can minimize and unminimize surfaces but clients can only
request that its surface is minimized. The client doesn't need to be involved
in a minimize action, unlike (un)maximize, it only needs a way to track its
minimize state and request to be minimized. This patch adds minimize and
unminimize protocol events for this purpose.

Further, the term minimize is relatively subjective and defined by the
implementation. Clients should not expect that minimized means the surface
will be invisable to the user. There are several use cases where displaying
minimized surfaces will be useful. Clients might want to change input handling
or pause when minimized but nothing should change with regards to submitting
surface buffer updates.
 protocol/wayland.xml |   38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 0ce68ef..8fb5841 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -527,7 +527,7 @@
-  <interface name="wl_shell_surface" version="1">
+  <interface name="wl_shell_surface" version="2">
     <description summary="desktop style meta data interface">
       An interface implemented by a wl_surface.  On server side the
@@ -729,6 +729,42 @@
 	to the client owning the popup surface.
+    <!-- Version 2 additions -->
+    <request name="set_minimized">
+      <description summary="request minimize">
+	A request from the client to notify the compositor that it wants to be
+	minimized.
+      </description>
+    </request>
+    <event name="maximize">
+      <description summary="suggest maximize">
+	The maximize event is to signal to the client that it should become
+	maximized.
+      </description>
+    </event>
+    <event name="unmaximize">
+      <description summary="suggest unmaximize">
+	The unmaximize event is to signal to the client that it should become
+	unmaximized.
+      </description>
+    </event>
+    <event name="minimize">
+      <description summary="minimize notification">
+	The minimize event is to notify the client that it has been minimized.
+      </description>
+    </event>
+    <event name="unminimize">
+      <description summary="unminimize notification">
+	The unminimize event is to notify the client that it has been
+	unminimized.
+      </description>
+    </event>
   <interface name="wl_surface" version="2">

More information about the wayland-devel mailing list