Skip to content

xcb_in: Allow file descriptors to arrive early

Julian Orth requested to merge mahkoh/libxcb:pending-fds into master

The xserver sends file descriptors independently of replies. If the server sends many events to the client, it is possible for the reply to arrive several messages after the file descriptor.

The code already supported this but only if the intermediate messages ended in partial packets.

With this patch, file descriptors will be buffered indefinitely until they are consumed by a reply. There is still a limit of 16 file descriptors imposed by the XCB_MAX_PASS_FD constant. If this limit is exceeded, we call _xcb_conn_shutdown.

Merge request reports