[Xcb] xcb_composite_redirect_window NEVER replies

Peter Harris pharris at opentext.com
Wed Nov 4 12:10:26 PST 2015


On 2015-11-04 14:39, Juan Lao Tebar wrote:
> 2015-11-04 4:05 GMT+01:00 Peter Harris <peter at harr.ca>:
>>
>> You're waiting for a reply to a request that doesn't actually have a
>> reply. See http://cgit.freedesktop.org/xorg/proto/compositeproto/tree/compositeproto.txt
>> (the requests with a reply have a -> delimiter between the request
>> structure and the reply structure).
> 
> Perfect! Thanks for the link, it will help me a lot with other things!
> 
> The only thing that I don't understand is why xcb_wait_for_reply
> returns NULL and does NOT return an error when the window id is
> incorrect.

> When I perform a redirect, is there any way to check if there was any error?

By default, errors for requests without a reply go to the event queue.
Use xcb_wait_for_event (don't forget to xcb_flush first).

If you want to check for an error inline, use the _checked version of
the function, and call xcb_request_check instead of xcb_wait_for_reply.

See http://www.x.org/archive/X11R7.7/doc/man/man3/xcb-requests.3.xhtml

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://connectivity.opentext.com/
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list