[Xcb] XCB problems with ICCCM...

Uli Schlachter psychon at znc.in
Fri Jul 1 00:50:47 PDT 2011


On 29.06.2011 21:55, Garry Iglesias wrote:
>  - then I can't be able to add protocols to the window, and then I
> can't handle properly the window destruction...
> I joined a test case (see attache "xcbTest_main.cpp"...

I asked xtrace what was going on. This is what it says about the
WM_DELETE_WINDOW ChangeProperty (Please not that the window has id 0x02000000,
so that argument is wrong, too):

000:<:0004: 28: Request(18): ChangeProperty mode=Replace(0x00) window=0x00000176
property=0x2000000(unrecognized atom) type=0x4("ATOM")

If I replace this line:


Then suddenly everything works, WM_PROTOCOLS-wise.

> By the way, forgot to mention that I never receive the message
> XCB_DESTROY_NOTIFY despite I set the flag
> XCB_EVENT_MASK_STRUCTURE_NOTIFY on window creation...

Without WM_DELETE_WINDOW, the WM uses XKillClient() & xcb_kill_client(). That
disconnects you from the X11 server without any event. With WM_DELETE_WINDOW you
get a ClientMessage instead.

ICCCM explicitly says:
Clients, usually those with multiple top-level windows, whose server connection
must survive the deletion of some of their top-level windows, should include
the atom WM_DELETE_WINDOW in the WM_PROTOCOLS property on each such window.

(However, it looks like it doesn't mention KillClient anywhere explicitely. In
fact, I don't really see anything about what should happen with
WM_DELETE_WINDOW. So why does my WM use KillClient instead of DestroyWindow?)


"Do you know that books smell like nutmeg or some spice from a foreign land?"
                                                  -- Faber in Fahrenheit 451

More information about the Xcb mailing list