<div dir="ltr">The server decoration protocol negotiates between the client and server<br>whether the client should default to drawing window decorations, and<br>informs the compositor what the client is doing.<br><br>This is useful not just for a compostior that is doing decorations<br>itself, but much more importantly for a toolkit, such as Qt which<br>primarily targets embedded and IVI applications, not to have to modify clients<br>to add a header bar which makes them usable on a desktop compositor.<br><br>This file is currently copied in multiple places across GTK, Sway as well<br>as being needed in both Qt and KDE. We should have this in a shared<br>place.<br>---<br> unstable/server-decoration/server-decoration.xml | 94 ++++++++++++++++++++++++<br> 1 file changed, 94 insertions(+)<br> create mode 100644 unstable/server-decoration/server-decoration.xml<br><br>diff --git a/unstable/server-decoration/server-decoration.xml b/unstable/server-decoration/server-decoration.xml<br>new file mode 100644<br>index 0000000..8bc106c<br>--- /dev/null<br>+++ b/unstable/server-decoration/server-decoration.xml<br>@@ -0,0 +1,94 @@<br>+<?xml version="1.0" encoding="UTF-8"?><br>+<protocol name="server_decoration"><br>+  <copyright><![CDATA[<br>+    Copyright (C) 2015 Martin Gräßlin<br>+<br>+    This program is free software: you can redistribute it and/or modify<br>+    it under the terms of the GNU Lesser General Public License as published by<br>+    the Free Software Foundation, either version 2.1 of the License, or<br>+    (at your option) any later version.<br>+<br>+    This program is distributed in the hope that it will be useful,<br>+    but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+    GNU Lesser General Public License for more details.<br>+<br>+    You should have received a copy of the GNU Lesser General Public License<br>+    along with this program.  If not, see <<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.<br>+  ]]></copyright><br>+  <interface  name="org_kde_kwin_server_decoration_manager" version="1"><br>+      <description summary="Server side window decoration manager"><br>+        This interface allows to coordinate whether the server should create<br>+        a server-side window decoration around a wl_surface representing a<br>+        shell surface (wl_shell_surface or similar). By announcing support<br>+        for this interface the server indicates that it supports server<br>+        side decorations.<br>+      </description><br>+      <request name="create"><br>+        <description summary="Create a server-side decoration object for a given surface"><br>+            When a client creates a server-side decoration object it indicates<br>+            that it supports the protocol. The client is supposed to tell the<br>+            server whether it wants server-side decorations or will provide<br>+            client-side decorations.<br>+<br>+            If the client does not create a server-side decoration object for<br>+            a surface the server interprets this as lack of support for this<br>+            protocol and considers it as client-side decorated. Nevertheless a<br>+            client-side decorated surface should use this protocol to indicate<br>+            to the server that it does not want a server-side deco.<br>+        </description><br>+        <arg name="id" type="new_id" interface="org_kde_kwin_server_decoration"/><br>+        <arg name="surface" type="object" interface="wl_surface"/><br>+      </request><br>+      <enum name="mode"><br>+            <description summary="Possible values to use in request_mode and the event mode."/><br>+            <entry name="None" value="0" summary="Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated."/><br>+            <entry name="Client" value="1" summary="Client-side decoration: The decoration is part of the surface and the client."/><br>+            <entry name="Server" value="2" summary="Server-side decoration: The server embeds the surface into a decoration frame."/><br>+      </enum><br>+      <event name="default_mode"><br>+          <description summary="The default mode used on the server"><br>+              This event is emitted directly after binding the interface. It contains<br>+              the default mode for the decoration. When a new server decoration object<br>+              is created this new object will be in the default mode until the first<br>+              request_mode is requested.<br>+<br>+              The server may change the default mode at any time.<br>+          </description><br>+          <arg name="mode" type="uint" summary="The default decoration mode applied to newly created server decorations."/><br>+      </event><br>+  </interface><br>+  <interface name="org_kde_kwin_server_decoration" version="1"><br>+      <request name="release" type="destructor"><br>+        <description summary="release the server decoration object"/><br>+      </request><br>+      <enum name="mode"><br>+            <description summary="Possible values to use in request_mode and the event mode."/><br>+            <entry name="None" value="0" summary="Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated."/><br>+            <entry name="Client" value="1" summary="Client-side decoration: The decoration is part of the surface and the client."/><br>+            <entry name="Server" value="2" summary="Server-side decoration: The server embeds the surface into a decoration frame."/><br>+      </enum><br>+      <request name="request_mode"><br>+          <description summary="The decoration mode the surface wants to use."/><br>+          <arg name="mode" type="uint" summary="The mode this surface wants to use."/><br>+      </request><br>+      <event name="mode"><br>+          <description summary="The new decoration mode applied by the server"><br>+              This event is emitted directly after the decoration is created and<br>+              represents the base decoration policy by the server. E.g. a server<br>+              which wants all surfaces to be client-side decorated will send Client,<br>+              a server which wants server-side decoration will send Server.<br>+<br>+              The client can request a different mode through the decoration request.<br>+              The server will acknowledge this by another event with the same mode. So<br>+              even if a server prefers server-side decoration it's possible to force a<br>+              client-side decoration.<br>+<br>+              The server may emit this event at any time. In this case the client can<br>+              again request a different mode. It's the responsibility of the server to<br>+              prevent a feedback loop.<br>+          </description><br>+          <arg name="mode" type="uint" summary="The decoration mode applied to the surface by the server."/><br>+      </event><br>+  </interface><br>+</protocol><br>-- <br>2.14.1<br><br></div>