[Xcb] [PATCH:xwininfo 0/2] Handle UTF8 window names & EMWH hints
James Cloos
cloos at jhcloos.com
Wed Jun 30 09:47:37 PDT 2010
>>>>> "AC" == Alan Coopersmith <alan.coopersmith at oracle.com> writes:
AC> Further updates for the xcb-ified xwininfo. Non Latin-1 WM_NAMES are
AC> handled via UTF-8 strings _NET_WM_NAME and assuming that COMPOUND_TEXT
AC> should be left to rot. And once started down the EMWH path, I picked
AC> a few more properties to show in the -wm section that seemed interesting.
I just gave your clone a test.
All worked well except for a regression when getting the info from an
Emacs window. Xprop(1) tells me that Emacs had set only:
WM_ICON_NAME(STRING) = "á.txt"
WM_NAME(STRING) = "á.txt"
(ignoring the non-NAME props), whereas other apps, such as urxvt, set
both WM(_ICON)?_NAME(STRING) and _NET_WM(_ICON)?_NAME(UTF8_STRING).
(Interstingly, urxvt's WM_NAME(STRING) pretended the UTF-8 were latin-1,
whereas Emacs converted it into latin-1. When I put a non-8859 char in
Emacs's title, xprop reported WM_NAME(COMPOUND_TEXT) = "金.txt".)
I will open a bug report for Emacs, suggesting support for the _NET_WM
versions of _NAME and _ICON_NAME. But until it is fixed, ....
In short, there unfortunately remain modern, usable and useful apps
which continue to use WM_NAME() rather than _NET_WM_NAME(). We
probably, therfore, need to support COMPOUND_TEXT for a bit longer.
On a related note, we should make xprop(1) report UTF8_STRING props
using code similar to what you added here, falling back to the current
output when conversion to the locale cannot work.
-JimC
--
James Cloos <cloos at jhcloos.com> OpenPGP: 1024D/ED7DAEA6
More information about the Xcb
mailing list