Sample Header Ad - 728x90

How to float a window which has WM_NAME but no WM_CLASS

6 votes
1 answer
2040 views
## Configuration Debian Linux 8.2, 64bit, Xmonad 0.11 ## When it started I recently upgraded my system (to debian8), so I had to make some adjustments to my xmonad.hs configuration - namely changing managehooks for GStreamer'sgst-launch windows from: , title =? "gst-launch-0.10" --> doFloat to: , title =? "gst-launch-1.0" --> doFloat I'm using title instead of className because gst-launch-1.0 windows have only this properties: $ xprop _NET_WM_DESKTOP(CARDINAL) = 6 WM_NAME(STRING) = "gst-launch-1.0" WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0 WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW ## What it does I'm encountering very strange behaviour, which I haven't seen with the old gst-launch-0.10 windows. When gst-launch-1.0 window (usually quite small - 400x300) starts it is one of following cases with decreasing probability: * adds the window as another tile (no floating at all) and stretches its content to fill this tile (keeping aspect ratio), the rest of the tile is black * adds the window as another tile (no floating at all) but draws only in the top left corner of this tile (no stretching), the rest of the tile shows X-Window background * with less than 10% probability it floats the window properly ## What I've tried doFullFloat and doCenterFloat do exactly the same thing (except it's centered or full in the last case) ## What I suspect I'm pretty sure the problem is in using only WM_NAME/title instead of WM_CLASS/className/appName, because the title can be changed during the lifetime of the window. I think the gst-launch-1.0 window starts with some other (or none) title and after some time it switches to gst-launch-1.0. Then it's only matter of luck if xmonad catches the original title or the final gst-launch-1.0. ## Question Is there some way to "wait a while" in manageHook so I could be sure to catch the final window WM_NAME/title ? Or any other idea? ## Additional info: Apparently this has been fixed in gstreamer - https://bugzilla.gnome.org/show_bug.cgi?id=750455 - but unfortunately I need to use gstreamer which comes with debian.
Asked by Jan Spurny (581 rep)
Nov 9, 2015, 07:37 PM
Last activity: Jul 2, 2022, 11:10 AM