[Xcb] Setting a Virtual Root and xcb_change_property

Uli Schlachter psychon at znc.in
Mon Mar 17 08:11:42 PDT 2014


On 17.03.2014 15:23, Philip Rushik wrote:
[...]
> In any case, this requires me to do an xcb_change_property on either the
> root window or the created window. I have seen code on how to do this in
> xlib, but in XCB I can't figure it out for the life of me, but I gather
> that it involves internal atoms.

1. Take the Xlib code
2. Line by line check for calls into libX11
3. Each of the Xlib functions (that you are using here) has an equivalent
function doing the same thing in xcb. Once you figured out the naming scheme,
it's really easy. Just check the function prototypes since the argument order
might be different.

> My current code looks like this:
[...]
>  xcb_change_property(conn,XCB_PROP_MODE_REPLACE,win,atom,XCB_ATOM_WINDOW,0,sizeof(win),&win);
> 
> This code compiles fine, but always gives me an error on execution (in
> xtrace) looking like this:
> 000:>:0018:Error 2=Value: major=18, minor=0, bad=0
[...]

Let's see... bad=0 likely means that you are using a "0" somewhere where you
shouldn't...
(And yes, this would be an error with Xlib, too).

Cheers,
Uli
-- 
If you ask me to debug your code, I'm going to mail you spiders.


More information about the Xcb mailing list