Open qsmodo opened 3 years ago
Okay, it turns out this is a more over-reaching issue. Not all windows respond to xcb_ewmh_get_wm_name
, especially old ones as xterm
, xmessage
, gvim
, and probably many others. This also means that rules[]
also fails for matching those windows. Indeed,
prints garbage or is skipped altogether for such windows.
Spectrwm works correctly in this regard, and it uses xcb_icccm
functions, not xcb_ewmh
, so probably that's the problem.
So, with the PR merge the largest problem is gone. Now there is the output title issue left.
What I have managed to do is in this branch. At first sight it seems to work well, the title is output for all windows. But if the title contains non-ASCII characters, it may get cropped or mangled. As it turns out, the Xlib uses some obscure COMPOUND_TEXT
and converting it to UTF-8
is as obscure and tricky (see this thread).
The options, as I see it, are
OUTPUT_TITLE
not to work.OUTPUT_TITLE
more or less works, but the window title may get mangled.OUTPUT_TITLE
altogether and use xdotool getactivewindow getwindowname
.Honestly option 3 looks the best to me. I have been using it for a couple of months in my Dzen bar and it works flawlessly. It also avoids duplicating code.
I've set
#define OUTPUT_TITLE True
in myconfig.h
, recompiled, but still no title is output.I added a debugging
fprintf(stderr, "%s\n", wtitle.strings);
statement inside this test:https://github.com/sulami/FrankenWM/blob/0eb3d54b0cf7cac958408826f1d434d8867f3a6b/frankenwm.c#L1385-L1388
and found out that the output is
(null)
. It seems something is wrong with handling that string.