Re: [Xcb] [PATCH 4/8] Add xcb_send_fd API

2013-11-07 Thread Uli Schlachter
On 07.11.2013 04:45, Keith Packard wrote: This uses sendmsg to transmit file descriptors from the application to the X server Signed-off-by: Keith Packard kei...@keithp.com [...] diff --git a/src/xcb_auth.c b/src/xcb_auth.c index a5b730c..2f7c93e 100644 --- a/src/xcb_auth.c +++

Re: [Xcb] [PATCH 4/8] Add xcb_send_fd API

2013-11-07 Thread Uli Schlachter
On 07.11.2013 10:03, Uli Schlachter wrote: On 07.11.2013 04:45, Keith Packard wrote: [...] +void +xcb_send_fd(xcb_connection_t *c, int fd) +{ +#if HAVE_SENDMSG if (c-has_error) return; This is needed before the pthread_mutex_lock(), because if xcb_connect_to_display() fails, it

Re: [Xcb] [PATCH 4/8] Add xcb_send_fd API

2013-11-07 Thread Keith Packard
Uli Schlachter psyc...@znc.in writes: The above seems to be an unrelated change. If this is needed due to some xcb-private header, then that header needs to be fixed. Otherwise this seems unneeded (for this patch). Yup, I figured out how to make it compile without the network header edits;

Re: [Xcb] [PATCH 4/8] Add xcb_send_fd API

2013-11-07 Thread Keith Packard
Uli Schlachter psyc...@znc.in writes: Having thought about this some more in the shower, I would suggest to turn xcb_send_fd() into a private _send_fd() and instead add xcb_send_request_with_fds() (or something like that). This isn't necessary; as I explained, the X server just holds onto FDs

Re: [Xcb] [PATCH 4/8] Add xcb_send_fd API

2013-11-07 Thread Daniel Martin
On 7 November 2013 13:14, Keith Packard kei...@keithp.com wrote: Uli Schlachter psyc...@znc.in writes: The above seems to be an unrelated change. If this is needed due to some xcb-private header, then that header needs to be fixed. Otherwise this seems unneeded (for this patch). Yup, I

Re: [Xcb] [PATCH 4/8] Add xcb_send_fd API

2013-11-07 Thread Uli Schlachter
On 07.11.2013 13:24, Keith Packard wrote: Uli Schlachter psyc...@znc.in writes: Having thought about this some more in the shower, I would suggest to turn xcb_send_fd() into a private _send_fd() and instead add xcb_send_request_with_fds() (or something like that). This isn't necessary; as I

Re: [Xcb] [PATCH 4/8] Add xcb_send_fd API

2013-11-07 Thread Mouse
I've seen lots of code which just uses an extension without checking for its availability. Yeah, and I've seen code that blindly assumes the values of the RGB masks on a DirectColor/TrueColor visual, too. I don't see any reason to care what happens to broken clients, as long as they don't

Re: [Xcb] [PATCH 4/8] Add xcb_send_fd API

2013-11-07 Thread Keith Packard
Uli Schlachter psyc...@znc.in writes: On 07.11.2013 13:24, Keith Packard wrote: Uli Schlachter psyc...@znc.in writes: Having thought about this some more in the shower, I would suggest to turn xcb_send_fd() into a private _send_fd() and instead add xcb_send_request_with_fds() (or something