Open reikred opened 3 years ago
UPDATE: I have made some progress on this one, more to come.
I looked at it briefly, but whenever I tried anything it started breaking things and producing error messages. So if you're making headway, I'll just wait until you have something that works. If you have any questions about implementation, just ask.
Can we get WM_CLASS set to "magic" for all magic windows? Right now xprop indicates for the console window that
_NET_WM_NAME(UTF8_STRING) = "tkcon 2.3 Main" WM_NAME(STRING) = "tkcon 2.3 Main" <------- a better value would be "magic:console" or perhaps "magic:tkcon" WM_CLASS(STRING) = "tkcon.tcl", "Tkcon.tcl" <------- should be "magic", "magic"
and for layout windows the values are something like
_NET_WM_NAME(UTF8_STRING) = "layout1" WM_NAME(STRING) = "layout1" <-------- better: magic:layoutfilename or just layoutfilename (not full path, too long) WM_CLASS(STRING) = "layout1", "Toplevel" <-------- should be "magic", "magic"
Having proper WM_CLASS and WM_NAME values makes life easier for the window manager and the user when it comes to finding, sorting and categorizing windows and icons.
As a starting point, one place where a hack-y fix could be applied is tkcon.tcl:620
wm title $root "tkcon $PRIV(version) $title"
wm title $root "magic"
I am however not a tcl/tk or x11 expert, and an expert could likely do something more intelligent and unified to set WM_CLASS and WM_NAME properly in all windows.