Many Linux window managers rely on being able to match against a new window's WM_CLASS or WM_NAME at launch to place them on the right workspace, set floating properties, etc. Since the window manager only looks at the value of these properties when the window is first mapped, ICCCM requires (for WM_CLASS) that
This property must be present when the window leaves the Withdrawn state and may be changed only while the window is in the Withdrawn state. Window managers may examine the property only when they start up and when the window leaves the Withdrawn state, but there should be no need for a client to change its state dynamically.
While no such requirement exists for WM_NAME, setting it before the window is mapped is advantageous for the same reason. Unfortunately, glutin currently does not appear to do this (neither does Spotify fwiw). It sets these properties after mapping the new window. While using xprop to inspect the window launched by examples/window.rs does show the right WM_NAME and WM_CLASS ("A fantastic window!"), this information is not visible to window managers. For example, neither of these two xmonad window hooks work:
className =? "A fantastic window!" --> doShift "1"
title =? "A fantastic window!" --> doShift "1"
On the other hand, matching against "" does move the window, suggesting that the window is initially mapped without title or class.
Many Linux window managers rely on being able to match against a new window's
WM_CLASSorWM_NAMEat launch to place them on the right workspace, set floating properties, etc. Since the window manager only looks at the value of these properties when the window is first mapped, ICCCM requires (forWM_CLASS) thatWhile no such requirement exists for
WM_NAME, setting it before the window is mapped is advantageous for the same reason. Unfortunately, glutin currently does not appear to do this (neither does Spotify fwiw). It sets these properties after mapping the new window. While usingxpropto inspect the window launched byexamples/window.rsdoes show the rightWM_NAMEandWM_CLASS("A fantastic window!"), this information is not visible to window managers. For example, neither of these two xmonad window hooks work:On the other hand, matching against "" does move the window, suggesting that the window is initially mapped without title or class.