Closed ReaperMantis closed 12 months ago
In my case, both ret
and res
are both None
type for _NET_WM_NAME
.
The application I'm using is RetroArch.
I suppose it's possible to have the property defined and set to an empty string deliberately, but at that point, I don't know if I wouldn't expect it to not fall back on the other value. I don't have much experience with these libraries, however. It's possible I'm short sighted but would lean towards bad practice on the application end.
It appears not all applications set the _NET_WM_NAME properety to set the window title. _NET_WM_NAME should be preferred, but If not present, use the WM_NAME to retain compatibility with applications that do not set it.
Sources:
modified: src/ewmhlib/Props.py Added the new Window.LEGACY_NAME="WM_NAME" property. This can be used to retain compatibility with older programs that do not set _NET_WM_NAME.
modified: src/ewmhlib/_ewmhlib.py Updated the logic for getName to now check for Window.LEGACY_NAME if the result of checking for Window.NAME does not return a value.