Re: How to properly discard socket-handoff GetInputFocus requests?

Uli Schlachter <[email protected]>
Newsgroups gmane.comp.freedesktop.xcb
Message-ID <[email protected]>
On 17.02.2018 17:36, Clemens Eisserer wrote:
> Hi,
> 
> The documentation for xcb_take_socket states xcb expectes the first
> request of an external socket owner after taking the socket to be a
> GetInputFocus request:
> 
> * This means that the first request you send after xcb_take_socket must cause a
> * reply (e.g. just insert a GetInputFocus request).....You do not have
> to wait for
> * any of the GetInputFocus replies, but can instead handle them via
> * xcb_discard_reply().
> 
> However, for both - xcb_discard_reply as well as xcb_discard_reply64 -
> it is stated in the documentation, that they are not suited for
> replies for requests not generated by xcb itself:
> 
> * Note that the sequence really does have to come from an xcb cookie;
> * this function is not designed to operate on socket-handoff replies.
> 
> So, how can I properly discard the GetInputFocus replies?

Uhm. I do not know, looking at the code and what Xlib does ended up
confusing me some more. Right now I see no reason why
xcb_discard_reply() would not work, but I haven't really checked this
properly.

How are you handling other replies that the requests that you send
generate? Can't you generate the GetInputFocus reply the same way?

Also, why do you need to take the socket at all? Can't you just use xcb
"the way it is intended to be used"?

Cheers,
Uli
-- 
Bruce Schneier can read and understand Perl programs.
_______________________________________________
Xcb mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xcb
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.