<div dir="ltr">Hi,<div><br></div><div>This patch is certainly an improvement upon the previous protocol draft which I reviewed, but it still does not address the most significant issue that I pointed out, which is that it both is too complex and lacks features. Why is there any "mode" when this is a protocol for enabling server-side decorations? By using the protocol in a server or client, you are enabling server-side decoration; why would there be any mention of client-side at all? If the compositor, for whatever reason, decides to do a runtime disable of SSD then it can simply destroy the global.</div><div><br></div><div>Please see again my mail on this topic from the previous thread: <a href="https://lists.freedesktop.org/archives/wayland-devel/2018-January/036495.html">https://lists.freedesktop.org/archives/wayland-devel/2018-January/036495.html</a></div><div><br></div><div>Regards,</div><div>Mike</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 18, 2018 at 3:01 PM Simon Ser <<a href="mailto:contact@emersion.fr" target="_blank">contact@emersion.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This adds a new protocol to negotiate server- and client-side rendering of<br>
window decorations for xdg-toplevels.<br>
---<br>
This is inspired by a protocol from KDE[0] which has been implemented in KDE<br>
and Sway and was submitted for consideration in 2017[1]. This patch provides an<br>
updated protocol with those concerns taken into account.<br>
<br>
This was iterated on privately between representatives of Sway and wlroots<br>
(Simon Ser and Drew DeVault), KDE (David Edmundson), and Mir (Alan Griffiths).<br>
<br>
A proof-of-concept of a client and server implementation is available at [2].<br>
<br>
[0] <a href="https://github.com/KDE/kwayland/blob/master/src/client/protocols/server-decoration.xml" rel="noreferrer" target="_blank">https://github.com/KDE/kwayland/blob/master/src/client/protocols/server-decoration.xml</a><br>
[1] <a href="https://lists.freedesktop.org/archives/wayland-devel/2017-October/035564.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/wayland-devel/2017-October/035564.html</a><br>
[2] <a href="https://github.com/swaywm/wlroots/pull/638" rel="noreferrer" target="_blank">https://github.com/swaywm/wlroots/pull/638</a><br>
<br>
Makefile.am | 1 +<br>
unstable/xdg-toplevel-decoration/README | 4 +<br>
.../xdg-toplevel-decoration-unstable-v1.xml | 127 +++++++++++++++++++++<br>
3 files changed, 132 insertions(+)<br>
create mode 100644 unstable/xdg-toplevel-decoration/README<br>
create mode 100644 unstable/xdg-toplevel-decoration/xdg-toplevel-decoration-unstable-v1.xml<br>
<br>
diff --git a/Makefile.am b/Makefile.am<br>
index 4b9a901..07744e9 100644<br>
--- a/Makefile.am<br>
+++ b/Makefile.am<br>
@@ -17,6 +17,7 @@ unstable_protocols = \<br>
unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml \<br>
unstable/xdg-output/xdg-output-unstable-v1.xml \<br>
unstable/input-timestamps/input-timestamps-unstable-v1.xml \<br>
+ unstable/xdg-toplevel-decoration/xdg-toplevel-decoration-unstable-v1.xml \<br>
$(NULL)<br>
<br>
stable_protocols = \<br>
diff --git a/unstable/xdg-toplevel-decoration/README b/unstable/xdg-toplevel-decoration/README<br>
new file mode 100644<br>
index 0000000..e927110<br>
--- /dev/null<br>
+++ b/unstable/xdg-toplevel-decoration/README<br>
@@ -0,0 +1,4 @@<br>
+xdg_toplevel_decoration protocol<br>
+<br>
+Maintainers:<br>
+Simon Ser <<a href="mailto:contact@emersion.fr" target="_blank">contact@emersion.fr</a>><br>
diff --git a/unstable/xdg-toplevel-decoration/xdg-toplevel-decoration-unstable-v1.xml b/unstable/xdg-toplevel-decoration/xdg-toplevel-decoration-unstable-v1.xml<br>
new file mode 100644<br>
index 0000000..acc1ed2<br>
--- /dev/null<br>
+++ b/unstable/xdg-toplevel-decoration/xdg-toplevel-decoration-unstable-v1.xml<br>
@@ -0,0 +1,127 @@<br>
+<?xml version="1.0" encoding="UTF-8"?><br>
+<protocol name="xdg_toplevel_decoration_unstable_v1"><br>
+ <copyright><br>
+ Copyright © 2018 Simon Ser<br>
+<br>
+ Permission is hereby granted, free of charge, to any person obtaining a<br>
+ copy of this software and associated documentation files (the "Software"),<br>
+ to deal in the Software without restriction, including without limitation<br>
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
+ and/or sell copies of the Software, and to permit persons to whom the<br>
+ Software is furnished to do so, subject to the following conditions:<br>
+<br>
+ The above copyright notice and this permission notice (including the next<br>
+ paragraph) shall be included in all copies or substantial portions of the<br>
+ Software.<br>
+<br>
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL<br>
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>
+ DEALINGS IN THE SOFTWARE.<br>
+ </copyright><br>
+<br>
+ <interface name="zxdg_toplevel_decoration_manager_v1" version="1"><br>
+ <description summary="window decoration manager"><br>
+ This interface permits choosing between client-side and server-side<br>
+ window decorations for a toplevel surface.<br>
+<br>
+ A window decoration is a user interface component used to move, resize and<br>
+ change a window's state. It can be managed either by the client (part of<br>
+ the surface) or by the server.<br>
+<br>
+ By advertizing this interface the server anounces support for server-side<br>
+ window decorations.<br>
+<br>
+ Warning! The protocol described in this file is experimental and<br>
+ backward incompatible changes may be made. Backward compatible changes<br>
+ may be added together with the corresponding interface version bump.<br>
+ Backward incompatible changes are done by bumping the version number in<br>
+ the protocol and interface names and resetting the interface version.<br>
+ Once the protocol is to be declared stable, the 'z' prefix and the<br>
+ version number in the protocol and interface names are removed and the<br>
+ interface version number is reset.<br>
+ </description><br>
+<br>
+ <enum name="error"><br>
+ <entry name="unconfigured_buffer" value="1"/><br>
+ <entry name="already_constructed" value="2"/><br>
+ </enum><br>
+<br>
+ <request name="destroy" type="destructor"><br>
+ <description summary="destroy the decoration manager object"><br>
+ Destroy the decoration manager.<br>
+ </description><br>
+ </request><br>
+<br>
+ <request name="get_decoration"><br>
+ <description summary="create a new decoration object"><br>
+ Create a new decoration object associated with the given toplevel.<br>
+<br>
+ Creating a zxdg_toplevel_decoration_v1 from a xdg_toplevel which has a<br>
+ buffer attached or committed is a client error, and any attempts by a<br>
+ client to attach or manipulate a buffer prior to the first<br>
+ zxdg_toplevel_decoration_v1.configure call must also be treated as<br>
+ errors.<br>
+ </description><br>
+ <arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/><br>
+ <arg name="toplevel" type="object" interface="xdg_toplevel"/><br>
+ </request><br>
+ </interface><br>
+<br>
+ <interface name="zxdg_toplevel_decoration_v1" version="1"><br>
+ <description summary="decoration object for a toplevel surface"><br>
+ The decoration object allows the client to switch between a client-side<br>
+ and server-side window decoration for a toplevel surface.<br>
+ </description><br>
+<br>
+ <request name="destroy" type="destructor"><br>
+ <description summary="destroy the decoration object"><br>
+ Switch back to client-side-only window decoration mode.<br>
+ </description><br>
+ </request><br>
+<br>
+ <request name="set_mode"><br>
+ <description summary="set the decoration mode"><br>
+ Set the toplevel surface decoration mode.<br>
+<br>
+ After requesting a decoration mode, the compositor will respond by<br>
+ emitting a xdg_surface.configure event. The client should then update<br>
+ its content, drawing it with or without decorations depending on the<br>
+ received mode. The client must also acknowledge the configure when<br>
+ committing the new content (see xdg_surface.ack_configure).<br>
+<br>
+ The compositor can ignore this request.<br>
+ </description><br>
+ <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/><br>
+ </request><br>
+<br>
+ <event name="preferred_mode"><br>
+ <description summary="advertise the server's preferred mode"><br>
+ The preferred_mode event describes the server's preferred decoration<br>
+ mode for this toplevel surface. The event is sent when binding to the<br>
+ decoration object and whenever the preferred mode changes.<br>
+ </description><br>
+ <arg name="mode" type="uint" enum="mode" summary="the preferred mode"/><br>
+ </event><br>
+<br>
+ <event name="configure"><br>
+ <description summary="suggest a surface change"><br>
+ The configure event asks the client to change its decoration mode. The<br>
+ configured state should not be applied immediately. See<br>
+ xdg_surface.configure for details.<br>
+ </description><br>
+ <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/><br>
+ </event><br>
+<br>
+ <enum name="mode"><br>
+ <description summary="window decoration modes"><br>
+ These values describe window decoration modes.<br>
+ </description><br>
+ <entry name="client" value="1" summary="client-side window decoration"/><br>
+ <entry name="server" value="2" summary="server-side window decoration"/><br>
+ </enum><br>
+ </interface><br>
+</protocol><br>
--<br>
2.16.1<br>
<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/wayland-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</blockquote></div></div>