We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1189

Summary: SDL X11 does not export _NET_WM_PID property on window
Product: SDL Reporter: Jason Smith <jassmith>
Component: videoAssignee: Marco Trevisan (Treviño) <mail>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: bart.bes+bugzilla, mail, martin.pitt
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
URL: https://bugs.launchpad.net/ubuntu/+source/libsdl1.2/+bug/777417
Attachments: X11: Added support to _NET_WM_PID and WM_CLIENT_MACHINE atoms (SDL-1.3)
X11: Move to XSetWMProperties and add support to _NET_WM_PID (SDL-1.3)
X11: Added support to _NET_WM_PID and WM_CLIENT_MACHINE atoms (SDL-1.2)

Description Jason Smith 2011-04-25 00:51:14 UTC
This property has grown in value in both GNOME Shell and Unity desktop environments. It is also quite useful to applications such as Docky, AWN, Cairo Dock, and others. _NET_WM_PID is simple to set and should have no drawbacks.
Comment 1 Marco Trevisan (Treviño) 2011-06-27 10:53:44 UTC
Created attachment 636 [details]
X11: Added support to _NET_WM_PID and WM_CLIENT_MACHINE atoms (SDL-1.3)

This is a first implementation of _NET_WM_PID support in SDL 1.3.

As stated by freedesktop specs [1], it also needs that the running hostname is set, and this is done via the WM_CLIENT_MACHINE atom.

This actually applies only to SDL 1.3. Patch for 1.2 coming.

[1] http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html#id2523510
Comment 2 Marco Trevisan (Treviño) 2011-06-27 10:58:43 UTC
Created attachment 637 [details]
X11: Move to XSetWMProperties and add support to _NET_WM_PID (SDL-1.3)

This is another implementation of the same patch which is using XSetWMProperties to set the main window properties including size, input and class hints plus WM_LOCALE_NAME.

The _NET_WM_PID atom is also set as before.

Chose the implementation that you prefer (this is working for SDL-1.3 only too).
Comment 3 Marco Trevisan (Treviño) 2011-06-28 13:58:39 UTC
Created attachment 639 [details]
X11: Added support to _NET_WM_PID and WM_CLIENT_MACHINE atoms (SDL-1.2)

Here you are the patch for SDL-1.2, I've just used XChangeProperty with Atoms instead of the convenience functions XSetWMProperties or XSetWMClientMachine because they both would give errors when compiling SDL without special configuration parameters (I can attach them too if requested, BTW).

@Jason: I will send this also the patch to launchpad for being added to the libsdl1.2debian package.
Comment 4 Martin Pitt 2011-07-06 06:46:53 UTC
Reopening. This patch isn't in hg, and there is no indication why the bug was marked "fixed".
Comment 5 Sam Lantinga 2012-01-06 23:08:30 UTC
Thanks Marco, this was on the TODO list!
Your patches are applied to source control.