Client messages _NET_WM_SHOW_WINDOW_MENU and _NET_WM_PERFORM_BUTTON_ACTION

Martin Gräßlin <[email protected]> Mon, 30 Jun 2014 16:13:10 +0200
Newsgroups gmane.comp.gnome.wm-spec
Message-ID <1811767.larKG4PKvU@martin-desktop>
--===============0631244534910353258==
Content-Type: multipart/signed; boundary="nextPart4721151.ccdLT55ySr"; micalg="pgp-sha1"; protocol="application/pgp-signature"


--nextPart4721151.ccdLT55ySr
Content-Type: multipart/mixed; boundary="nextPart2413625.IWeBctNBYr"
Content-Transfer-Encoding: quoted-printable

This is a multi-part message in MIME format.

=2D-nextPart2413625.IWeBctNBYr
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Hi all,

attached are two patches for the NETWM spec. One message is to show the=
 window=20
manager's window menu, the other is for passing the responsibility to p=
erform=20
a button action from the client to the window manager. For detailed=20
information please have a look on the attached patches.

The need for these two client messages were derived by GTK+ and KWin=20=

developers for better integrating GTK's new client-side-decorated windo=
ws in=20
environments which are not GNOME Shell.

KWin will add support for those two new hints and it looks like GTK+ an=
d=20
Mutter will also support them.

I would like to hear your feedback on them for inclusion into the NETWM=
 spec.

Best Regards
Martin Gr=C3=A4=C3=9Flin
=2D-nextPart2413625.IWeBctNBYr
Content-Disposition: attachment; filename="0001-_NET_WM_SHOW_WINDOW_MENU.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="ISO-8859-1"; name="0001-_NET_WM_SHOW_WINDOW_MENU.patch"

From=2069e43ccba5fbc09a2bf0da3106f46f20d392fddf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <[email protected]>
Date: Mon, 30 Jun 2014 15:34:57 +0200
Subject: [PATCH 1/2] _NET_WM_SHOW_WINDOW_MENU

Adding a new client message _NET_WM_SHOW_WINDOW_MENU which can be used
by Clients to show the window manager's window menu. The rational is
to integrate Clients using client-side-decorations better into the
environment they are running in.
=2D--
 wm-spec/wm-spec.xml | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/wm-spec/wm-spec.xml b/wm-spec/wm-spec.xml
index 0859dc6..9bb5c25 100644
=2D-- a/wm-spec/wm-spec.xml
+++ b/wm-spec/wm-spec.xml
@@ -1789,6 +1789,33 @@ default positions.
 Note: The property is not used anywhere else besides being listed in _NET_SUPPORTED.
                 </para>
         </sect2>
+    <sect2>
+        <title>_NET_WM_SHOW_WINDOW_MENU</title>
+        <para>
+By including this hint in _NET_SUPPORTED the Window Manager announces
+that it supports showing a menu offering window management options for a
+given client.
+        </para>
+        <para>
+A Client can request this menu by sending a _NET_WM_SHOW_WINDOW_MENU client message
+to the root window:
+        </para>
+        <programlisting><![CDATA[
+_NET_WM_SHOW_WINDOW_MENU
+  message_type = _NET_WM_SHOW_WINDOW_MENU
+  window = window for which the menu should be shown
+  format = 32
+  data.l[0] = xinput2_device_id
+  data.l[1] = root_x
+  data.l[2] = root_y
+  other data.l[] elements = 0
+]]></programlisting>
+        <para>
+If the Xinput2 device which triggered the event does not provide coordinates (e.g.
+triggered by a keyboard shortcut) the Client should set it to useful values the
+window manager can use to position the menu.
+        </para>
+    </sect2>
 </sect1>
 
 <sect1>
@@ -2305,6 +2332,9 @@ OR OTHER DEALINGS IN THE SOFTWARE.
 		<title>Changes since 1.4draft</title>
 		<itemizedlist>
 			<listitem><para>
+Added _NET_WM_SHOW_WINDOW_MENU
+			</para></listitem>
+			<listitem><para>
 Added _NET_WM_BYPASS_COMPOSITOR
 			</para></listitem>
 			<listitem><para>
=2D- 
2.0.0


=2D-nextPart2413625.IWeBctNBYr
Content-Disposition: attachment; filename="0002-_NET_WM_PERFORM_BUTTON_ACTION.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="ISO-8859-1"; name="0002-_NET_WM_PERFORM_BUTTON_ACTION.patch"

From=20d070b0abfdf3f6d70e3ef84ac23d46298c27e3c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <[email protected]>
Date: Mon, 30 Jun 2014 15:47:11 +0200
Subject: [PATCH 2/2] _NET_WM_PERFORM_BUTTON_ACTION

Adding a new client message _NET_WM_PERFORM_BUTTON_ACTION which can
be used by Clients to request the window manager to perform an action
when a button is pressed on the window decoration area of a window.
The rational is to integrate Clients using client-side-decorations
better into the environment they are running in. So instead of
performing an action like raise/lower on middle click the task is
delegated to the window manager. The window manager can then perform
the same action as it does for windows it decorates.
=2D--
 wm-spec/wm-spec.xml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/wm-spec/wm-spec.xml b/wm-spec/wm-spec.xml
index 9bb5c25..3e9ab92 100644
=2D-- a/wm-spec/wm-spec.xml
+++ b/wm-spec/wm-spec.xml
@@ -1816,6 +1816,35 @@ triggered by a keyboard shortcut) the Client should set it to useful values the
 window manager can use to position the menu.
         </para>
     </sect2>
+    <sect2>
+        <title>_NET_WM_PERFORM_BUTTON_ACTION</title>
+        <para>
+By including this hint in _NET_SUPPORTED the Window Manager announces
+that it supports performing pointer button specific events. For example a window
+manager might raise or lower a Client when the decoration is middle clicked or show
+a window menu on right click.
+        </para>
+        <para>
+A Client can request that the window manger should perform such an action by sending
+a _NET_WM_PERFORM_BUTTON_ACTION client message to the root window:
+        </para>
+        <programlisting><![CDATA[
+_NET_WM_PERFORM_BUTTON_ACTION
+  message_type = _NET_WM_PERFORM_BUTTON_ACTION
+  window = window for which the action should be performed
+  format = 32
+  data.l[0] = xinput2_device_id
+  data.l[1] = root_x
+  data.l[2] = root_y
+  data.l[3] = button
+  data.l[4] = timestamp
+]]></programlisting>
+        <para>
+If the Xinput2 device which triggered the event does not provide coordinates (e.g.
+triggered by a keyboard shortcut) the Client should set it to useful values the
+window manager can use to position the menu.
+        </para>
+    </sect2>
 </sect1>
 
 <sect1>
@@ -2332,6 +2361,9 @@ OR OTHER DEALINGS IN THE SOFTWARE.
 		<title>Changes since 1.4draft</title>
 		<itemizedlist>
 			<listitem><para>
+Added _NET_WM_PERFORM_BUTTON_ACTION
+			</para></listitem>
+			<listitem><para>
 Added _NET_WM_SHOW_WINDOW_MENU
 			</para></listitem>
 			<listitem><para>
=2D- 
2.0.0


=2D-nextPart2413625.IWeBctNBYr--
This is a multi-part message in MIME format.

--nextPart2413625.IWeBctNBYr
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Hi all,

attached are two patches for the NETWM spec. One message is to show the=
 window=20
manager's window menu, the other is for passing the responsibility to p=
erform=20
a button action from the client to the window manager. For detailed=20
information please have a look on the attached patches.

The need for these two client messages were derived by GTK+ and KWin=20=

developers for better integrating GTK's new client-side-decorated windo=
ws in=20
environments which are not GNOME Shell.

KWin will add support for those two new hints and it looks like GTK+ an=
d=20
Mutter will also support them.

I would like to hear your feedback on them for inclusion into the NETWM=
 spec.

Best Regards
Martin Gr=C3=A4=C3=9Flin
--nextPart2413625.IWeBctNBYr
Content-Disposition: attachment; filename="0001-_NET_WM_SHOW_WINDOW_MENU.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="ISO-8859-1"; name="0001-_NET_WM_SHOW_WINDOW_MENU.patch"

From 69e43ccba5fbc09a2bf0da3106f46f20d392fddf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <[email protected]>
Date: Mon, 30 Jun 2014 15:34:57 +0200
Subject: [PATCH 1/2] _NET_WM_SHOW_WINDOW_MENU

Adding a new client message _NET_WM_SHOW_WINDOW_MENU which can be used
by Clients to show the window manager's window menu. The rational is
to integrate Clients using client-side-decorations better into the
environment they are running in.
---
 wm-spec/wm-spec.xml | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/wm-spec/wm-spec.xml b/wm-spec/wm-spec.xml
index 0859dc6..9bb5c25 100644
--- a/wm-spec/wm-spec.xml
+++ b/wm-spec/wm-spec.xml
@@ -1789,6 +1789,33 @@ default positions.
 Note: The property is not used anywhere else besides being listed in _NET_SUPPORTED.
                 </para>
         </sect2>
+    <sect2>
+        <title>_NET_WM_SHOW_WINDOW_MENU</title>
+        <para>
+By including this hint in _NET_SUPPORTED the Window Manager announces
+that it supports showing a menu offering window management options for a
+given client.
+        </para>
+        <para>
+A Client can request this menu by sending a _NET_WM_SHOW_WINDOW_MENU client message
+to the root window:
+        </para>
+        <programlisting><![CDATA[
+_NET_WM_SHOW_WINDOW_MENU
+  message_type = _NET_WM_SHOW_WINDOW_MENU
+  window = window for which the menu should be shown
+  format = 32
+  data.l[0] = xinput2_device_id
+  data.l[1] = root_x
+  data.l[2] = root_y
+  other data.l[] elements = 0
+]]></programlisting>
+        <para>
+If the Xinput2 device which triggered the event does not provide coordinates (e.g.
+triggered by a keyboard shortcut) the Client should set it to useful values the
+window manager can use to position the menu.
+        </para>
+    </sect2>
 </sect1>
 
 <sect1>
@@ -2305,6 +2332,9 @@ OR OTHER DEALINGS IN THE SOFTWARE.
 		<title>Changes since 1.4draft</title>
 		<itemizedlist>
 			<listitem><para>
+Added _NET_WM_SHOW_WINDOW_MENU
+			</para></listitem>
+			<listitem><para>
 Added _NET_WM_BYPASS_COMPOSITOR
 			</para></listitem>
 			<listitem><para>
-- 
2.0.0


--nextPart2413625.IWeBctNBYr
Content-Disposition: attachment; filename="0002-_NET_WM_PERFORM_BUTTON_ACTION.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="ISO-8859-1"; name="0002-_NET_WM_PERFORM_BUTTON_ACTION.patch"

From d070b0abfdf3f6d70e3ef84ac23d46298c27e3c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <[email protected]>
Date: Mon, 30 Jun 2014 15:47:11 +0200
Subject: [PATCH 2/2] _NET_WM_PERFORM_BUTTON_ACTION

Adding a new client message _NET_WM_PERFORM_BUTTON_ACTION which can
be used by Clients to request the window manager to perform an action
when a button is pressed on the window decoration area of a window.
The rational is to integrate Clients using client-side-decorations
better into the environment they are running in. So instead of
performing an action like raise/lower on middle click the task is
delegated to the window manager. The window manager can then perform
the same action as it does for windows it decorates.
---
 wm-spec/wm-spec.xml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/wm-spec/wm-spec.xml b/wm-spec/wm-spec.xml
index 9bb5c25..3e9ab92 100644
--- a/wm-spec/wm-spec.xml
+++ b/wm-spec/wm-spec.xml
@@ -1816,6 +1816,35 @@ triggered by a keyboard shortcut) the Client should set it to useful values the
 window manager can use to position the menu.
         </para>
     </sect2>
+    <sect2>
+        <title>_NET_WM_PERFORM_BUTTON_ACTION</title>
+        <para>
+By including this hint in _NET_SUPPORTED the Window Manager announces
+that it supports performing pointer button specific events. For example a window
+manager might raise or lower a Client when the decoration is middle clicked or show
+a window menu on right click.
+        </para>
+        <para>
+A Client can request that the window manger should perform such an action by sending
+a _NET_WM_PERFORM_BUTTON_ACTION client message to the root window:
+        </para>
+        <programlisting><![CDATA[
+_NET_WM_PERFORM_BUTTON_ACTION
+  message_type = _NET_WM_PERFORM_BUTTON_ACTION
+  window = window for which the action should be performed
+  format = 32
+  data.l[0] = xinput2_device_id
+  data.l[1] = root_x
+  data.l[2] = root_y
+  data.l[3] = button
+  data.l[4] = timestamp
+]]></programlisting>
+        <para>
+If the Xinput2 device which triggered the event does not provide coordinates (e.g.
+triggered by a keyboard shortcut) the Client should set it to useful values the
+window manager can use to position the menu.
+        </para>
+    </sect2>
 </sect1>
 
 <sect1>
@@ -2332,6 +2361,9 @@ OR OTHER DEALINGS IN THE SOFTWARE.
 		<title>Changes since 1.4draft</title>
 		<itemizedlist>
 			<listitem><para>
+Added _NET_WM_PERFORM_BUTTON_ACTION
+			</para></listitem>
+			<listitem><para>
 Added _NET_WM_SHOW_WINDOW_MENU
 			</para></listitem>
 			<listitem><para>
-- 
2.0.0


--nextPart2413625.IWeBctNBYr--

--nextPart4721151.ccdLT55ySr
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEABECAAYFAlOxcH0ACgkQqVXwidMiVrq7kQCbBv7Xu/NdX0IHLxlyOKI8Z//q
weoAnAvey9q0ubx3j3cbDuDEVrSP+jmN
=P12u
-----END PGP SIGNATURE-----

--nextPart4721151.ccdLT55ySr--


--===============0631244534910353258==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
wm-spec-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/wm-spec-list

--===============0631244534910353258==--