Bug 10016

Summary: Xephyr/Xnest should set the WM_CLASS property
Product: xorg Reporter: Brice Goglin <brice.goglin>
Component: Server/DDX/XephyrAssignee: Matthew Allum <mallum>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: dnusinow
Version: 7.2 (2007.02)   
Hardware: Other   
OS: All   
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366558
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 10101    
Description Flags
Proposed patch. Please review.
Proposed patch. none

Description Brice Goglin 2007-02-18 04:35:25 UTC
This bug has been reported to the Debian BTS 9 months ago by Christophe Troestler. It was against Xnest, but the same bug is valid for Xephyr, and I guess Xephyr is more likely to get fixed.

Xnest/Xephyr does not set the WM_CLASS property which makes it difficult to
treat it specially by window managers.

$ xprop
_NET_WM_ICON_GEOMETRY(CARDINAL) = 697, 1018, 200, 32
                window state: Normal
                icon window: 0x0
                program specified minimum size: 640 by 480
                program specified maximum size: 640 by 480
WM_NAME(STRING) = "Xephyr on :1 ( ctrl+shift grabs mouse and keyboard )"

Comment 1 Daniel Stone 2007-02-27 01:36:30 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 David Nusinow 2008-02-27 18:43:57 UTC
Created attachment 14625 [details] [review]
Proposed patch. Please review.

This works in my hands and should conform to the ICCCM.
Comment 3 David Nusinow 2008-02-28 16:47:07 UTC
Created attachment 14673 [details] [review]
Proposed patch.

This is slightly cleaner than my last patch. The class hint structure pointer is now just a variable on the stack of hostx_init rather than a part of the global structure, which is unnecessary. I also only allocate and free it once rather than each time in the inner loop, thus saving some churn.
Comment 4 Adam Jackson 2008-03-24 13:07:25 UTC
Applied to git, thanks!

Note, only applied to Xephyr.  If someone wants to fix it for Xnest, yay, please reopen this bug to let me know.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.