Proposal: add a _NET_WM_DESKTOP_FILE

Martin Graesslin <[email protected]> Wed, 11 Nov 2015 13:59:41 +0100
Newsgroups gmane.comp.gnome.wm-spec
Message-ID <1703089.EIEtIUU5cT@martin-desktop>
--===============5388244271806105985==
Content-Type: multipart/signed; boundary="nextPart1968119.pnI14V4cNJ"; micalg="pgp-sha1"; protocol="application/pgp-signature"

--nextPart1968119.pnI14V4cNJ
Content-Type: multipart/mixed; boundary="nextPart20687335.alxH3FLv42"
Content-Transfer-Encoding: quoted-printable

This is a multi-part message in MIME format.

--nextPart20687335.alxH3FLv42
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"

Hi X11 friends,

please find attached a patch to the WM spec to add a new window property.=20
Inspiration and idea is taken from Wayland's wl_shell_surface::set_class.

The description should hopefully explain it:

_NET_WM_DESKTOP_FILE, UTF8_STRING

The client SHOULD set this property to the name of the desktop file as=20
described in http://standards.freedesktop.org/desktop-entry-spec/latest/ if=
 it=20
is known to the
client. In case it is not known to the client, it SHOULD NOT set the proper=
ty=20
at all.

In case the desktop file is not stored in a standard location, the client=20
should set _NET_WM_DESKTOP_FILE to the full path (e.g. "/opt/foo/
org.freedesktop.foo.desktop").

Otherwise the client should set _NET_WM_DESKTOP_FILE to the base name of th=
e=20
desktop entry. This is the file name, without the full path and without=20
extension, of the desktop entry that represents this application according =
to=20
the freedesktop desktop entry specification (e.g. "org.freedesktop.foo").

=2D---

I hope we can add this to the protocol. I think it should be easy for toolk=
its=20
to add support for this given that it's needed for Wayland anyway. With my =
Qt=20
hat on I know that everything is in place to add it to Qt 5.7. With my KDE =
hat=20
on I know that everything is in place to add it to frameworks 5.17 even=20
without support in Qt yet.

Opinions?

Best Regards
Martin Gr=E4=DFlin

--nextPart20687335.alxH3FLv42
Content-Disposition: attachment; filename="0001-wm-spec-Add-a-_NET_WM_DESKTOP_FILE.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0001-wm-spec-Add-a-_NET_WM_DESKTOP_FILE.patch"

From=200a973875f05f02a31c10439ff3b141d5f3983f69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <[email protected]>
Date: Wed, 11 Nov 2015 13:50:09 +0100
Subject: [PATCH] [wm-spec] Add a _NET_WM_DESKTOP_FILE

This new property allows a client window to specify the desktop file
which belongs to the application. This can provide additional
information for e.g. task managers and window managers.
---
 wm-spec/wm-spec.xml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/wm-spec/wm-spec.xml b/wm-spec/wm-spec.xml
index 0859dc6..b81c35c 100644
--- a/wm-spec/wm-spec.xml
+++ b/wm-spec/wm-spec.xml
@@ -1599,6 +1599,29 @@ copies) and thus perform better. An application which creates
 pop-up windows might always want to run composited to avoid exposes.
         </para>
        </sect2>
+       <sect2><title>_NET_WM_DESKTOP_FILE</title>
+       <programlisting><![CDATA[
+_NET_WM_DESKTOP_FILE, UTF8_STRING
+]]></programlisting>
+       <para>
+The client SHOULD set this property to the name of the desktop file as
+described in the <ulink url="http://standards.freedesktop.org/desktop-entry-spec/latest/">
+freedesktop desktop entry specification</ulink>
+if it is known to the client. In case it is not known to the client, it
+SHOULD NOT set the property at all.
+       </para>
+       <para>
+In case the desktop file is not stored in a standard location, the client
+should set _NET_WM_DESKTOP_FILE to the full path
+(e.g. &quot;/opt/foo/org.freedesktop.foo.desktop&quot;).
+       </para>
+       <para>
+Otherwise the client should set _NET_WM_DESKTOP_FILE to the base name of the
+desktop entry. This is the file name, without the full path and without
+extension, of the desktop entry that represents this application according to
+the freedesktop desktop entry specification (e.g. &quot;org.freedesktop.foo&quot;).
+       </para>
+       </sect2>
 </sect1>
 <sect1>
 	<title>Window Manager Protocols</title>
@@ -2313,6 +2336,9 @@ Added _NET_WM_STATE_FOCUSED.
 			<listitem><para>
 Added _NET_WM_OPAQUE_REGION
 			</para></listitem>
+			<listitem><para>
+Added _NET_WM_DESKTOP_FILE
+			</para></listitem>
 		</itemizedlist>
 	    </sect2>
  	    <sect2>
-- 
2.6.2


--nextPart20687335.alxH3FLv42--
This is a multi-part message in MIME format.

--nextPart20687335.alxH3FLv42
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"

Hi X11 friends,

please find attached a patch to the WM spec to add a new window property.=20
Inspiration and idea is taken from Wayland's wl_shell_surface::set_class.

The description should hopefully explain it:

_NET_WM_DESKTOP_FILE, UTF8_STRING

The client SHOULD set this property to the name of the desktop file as=20
described in http://standards.freedesktop.org/desktop-entry-spec/latest/ if=
 it=20
is known to the
client. In case it is not known to the client, it SHOULD NOT set the proper=
ty=20
at all.

In case the desktop file is not stored in a standard location, the client=20
should set _NET_WM_DESKTOP_FILE to the full path (e.g. "/opt/foo/
org.freedesktop.foo.desktop").

Otherwise the client should set _NET_WM_DESKTOP_FILE to the base name of th=
e=20
desktop entry. This is the file name, without the full path and without=20
extension, of the desktop entry that represents this application according =
to=20
the freedesktop desktop entry specification (e.g. "org.freedesktop.foo").

=2D---

I hope we can add this to the protocol. I think it should be easy for toolk=
its=20
to add support for this given that it's needed for Wayland anyway. With my =
Qt=20
hat on I know that everything is in place to add it to Qt 5.7. With my KDE =
hat=20
on I know that everything is in place to add it to frameworks 5.17 even=20
without support in Qt yet.

Opinions?

Best Regards
Martin Gr=E4=DFlin

--nextPart20687335.alxH3FLv42
Content-Disposition: attachment; filename="0001-wm-spec-Add-a-_NET_WM_DESKTOP_FILE.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0001-wm-spec-Add-a-_NET_WM_DESKTOP_FILE.patch"

From 0a973875f05f02a31c10439ff3b141d5f3983f69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <[email protected]>
Date: Wed, 11 Nov 2015 13:50:09 +0100
Subject: [PATCH] [wm-spec] Add a _NET_WM_DESKTOP_FILE

This new property allows a client window to specify the desktop file
which belongs to the application. This can provide additional
information for e.g. task managers and window managers.
---
 wm-spec/wm-spec.xml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/wm-spec/wm-spec.xml b/wm-spec/wm-spec.xml
index 0859dc6..b81c35c 100644
--- a/wm-spec/wm-spec.xml
+++ b/wm-spec/wm-spec.xml
@@ -1599,6 +1599,29 @@ copies) and thus perform better. An application which creates
 pop-up windows might always want to run composited to avoid exposes.
         </para>
        </sect2>
+       <sect2><title>_NET_WM_DESKTOP_FILE</title>
+       <programlisting><![CDATA[
+_NET_WM_DESKTOP_FILE, UTF8_STRING
+]]></programlisting>
+       <para>
+The client SHOULD set this property to the name of the desktop file as
+described in the <ulink url="http://standards.freedesktop.org/desktop-entry-spec/latest/">
+freedesktop desktop entry specification</ulink>
+if it is known to the client. In case it is not known to the client, it
+SHOULD NOT set the property at all.
+       </para>
+       <para>
+In case the desktop file is not stored in a standard location, the client
+should set _NET_WM_DESKTOP_FILE to the full path
+(e.g. &quot;/opt/foo/org.freedesktop.foo.desktop&quot;).
+       </para>
+       <para>
+Otherwise the client should set _NET_WM_DESKTOP_FILE to the base name of the
+desktop entry. This is the file name, without the full path and without
+extension, of the desktop entry that represents this application according to
+the freedesktop desktop entry specification (e.g. &quot;org.freedesktop.foo&quot;).
+       </para>
+       </sect2>
 </sect1>
 <sect1>
 	<title>Window Manager Protocols</title>
@@ -2313,6 +2336,9 @@ Added _NET_WM_STATE_FOCUSED.
 			<listitem><para>
 Added _NET_WM_OPAQUE_REGION
 			</para></listitem>
+			<listitem><para>
+Added _NET_WM_DESKTOP_FILE
+			</para></listitem>
 		</itemizedlist>
 	    </sect2>
  	    <sect2>
-- 
2.6.2


--nextPart20687335.alxH3FLv42--

--nextPart1968119.pnI14V4cNJ
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

iEYEABECAAYFAlZDO8MACgkQqVXwidMiVrqmTACfebju5V7w4+o6WI1k/cWhJWq9
oToAn0PbuOr2PF9FYLAfFVcoXSw8uGXP
=wef6
-----END PGP SIGNATURE-----

--nextPart1968119.pnI14V4cNJ--


--===============5388244271806105985==
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

--===============5388244271806105985==--