[Xcb] How to properly discard socket-handoff GetInputFocus requests?

Uli Schlachter psychon at znc.in
Sat Mar 3 09:15:49 UTC 2018

On 26.02.2018 09:07, Clemens Eisserer wrote:
> Hi Uli,
>> The last argument to xcb_take_socket gives you the sequence number. It
>> is just the number of requests that were sent on the connection. So the
>> sequence number of the first request that you generate on your own is
>> <that number> + 1, etc.
> Strange, I tried calling xcb_discard_reply64(sent + 1) and it didn't work.

How do you determine that? It seems to work for me (see the attached
program which sends two GetInputFocus requests via xcb_writev() and
discards the first reply, then uses xcb_poll_for_reply64() to test if
this really worked).

"Do you know that books smell like nutmeg or some spice from a foreign
                                              -- Faber in Fahrenheit 451
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 1500 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20180303/9b8e24f4/attachment.c>

More information about the Xcb mailing list