Bug 10016 - Xephyr/Xnest should set the WM_CLASS property
Summary: Xephyr/Xnest should set the WM_CLASS property
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xephyr (show other bugs)
Version: 7.2 (2007.02)
Hardware: Other All
: medium normal
Assignee: Matthew Allum
QA Contact: Xorg Project Team
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks: xorg-7.4
  Show dependency treegraph
 
Reported: 2007-02-18 04:35 UTC by Brice Goglin
Modified: 2008-03-24 13:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Proposed patch. Please review. (4.06 KB, patch)
2008-02-27 18:43 UTC, David Nusinow
no flags Details | Splinter Review
Proposed patch. (4.13 KB, patch)
2008-02-28 16:47 UTC, David Nusinow
no flags Details | Splinter Review

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
XKLAVIER_STATE(INTEGER) = 0, 0
_NET_WM_ICON_GEOMETRY(CARDINAL) = 697, 1018, 200, 32
_NET_WM_STATE(ATOM) =
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_FRAME_EXTENTS(CARDINAL) = 5, 5, 23, 5
_NET_WM_DESKTOP(CARDINAL) = 5
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                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 )"

Brice
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.