MC's Journal

Icons in mcwm and new program: hidden

About a week ago, while on the train to Linköping to celebrate the ex wife's birthday, I finished a small program, hidden. It's purpose in life is to list hidden windows, that is, windows with their WM_STATE hint set to Iconic. It's available from the mcwm git repo as hidden.c. See the mcwm project pages.

I have also changed the small 9icon script somewhat to better deal with windows with strange titles, for instance including shell glob symbols such as “*”. It works OK unless, of course, you have a quote in the window title. Sigh.

My own program, hidden, seems to have problems with some titles. I'm not sure it's me causing the problem, though.

During the same train trip I also wrote a program to display a menu window using only XCB. It's not finished but at least it maps a window and draws some text into it. Most of the time. About one in five times it doesn't draw anything at all. I admit I'm puzzled. I don't have time right now to hunt down the bug, though.

The plan is to eventually merge my small menu program with hidden. This will replace the functionality of 9icon in one small program that can easily be called from mcwm.

Writing GUI programs using only XCB is pretty painful, so I abstracted away some of it and finally ended up with a small program looking something like this:

win = window(1, 1, WIDTH, HEIGHT);
setfont(win, "12x24", "yellow", "black");
printat(win, 1, 20, "foo");

Perhaps this is the beginning of a small UI toolkit?