[Xcb] XCB problems with ICCCM...

Garry Iglesias garry.iglesias at gmail.com
Wed Jun 29 12:55:38 PDT 2011


Hi,

I recently upgrade to latest xcb... I had to make some changes on the
xcb-utils usage (split the icccm and so on)...

I encountered two main problems:

 - first the header used a variable named class !!! This is a problem
when compiling in C++...
 - 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"...

A note: I use a home-brew build system, so I cannot provide you the
makefile, but it should be quite simple to compile as it's only one
single source.

You need to link with those libraries in order to build the test case:

libpthread
libXdmcp
libXau
libxcb
libxcb-icccm

The program creates a window, tries to add a wm_protocol for
wm_delete_window... It seems it fails...
I also had to 'mask' the class usage, this is a dirty hack which I'd
like to remove:

#define class   __class
#include    <xcb/xcb_icccm.h>
#undef class

Here are the package versions I use:

libXau-1.0.6.tar.bz2
libXdmcp-1.1.0.tar.bz2
libxcb-1.7.tar.bz2
xcb-proto-1.6.tar.bz2
xcb-util-0.3.8.tar.bz2
xcb-util-image-0.3.8.tar.bz2
xcb-util-keysyms-0.3.8.tar.bz2
xcb-util-renderutil-0.3.8.tar.bz2
xcb-util-wm-0.3.8.tar.bz2

Honestly, I can't be 100% sure as I haven't touched my framework for
more than a year, but I'm quite confident that this thing was working
well on "previous" versions of XCB (and didn't have the 'class'
identifier issue...).

Maybe I missed something on the update but after 1 week trying to
debug my code all my ideas are dried out.

Thank you,

Garry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xcbTest_main.cpp
Type: text/x-c++src
Size: 5950 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20110629/ada1b936/attachment.cpp>


More information about the Xcb mailing list