libxcb/src
Uli Schlachter c4e40f646b Make some functions also work on error connections
There is no technical reason why xcb_get_setup() and xcb_get_file_descriptor()
shouldn't work on non-static error connections. They cannot be used for many
useful things, but at least they work.

This works around bugs in lots of programs out there which assume that
xcb_get_setup() does not return NULL and which just happily dereference the
results. Since xcb_connect() never returns NULL, it's a bit weird that
xcb_get_setup() can do so. xcb_get_file_descriptor() is just modified since this
can be done here equally easily and because the fd isn't closed until the final
xcb_disconnect() on the error connection.

Non-static error connections are connections which entered an error state after
xcb_connect() succeeded. If something goes wrong in establishing a connection,
xcb_connect() will return a static error connection which doesn't have the
fields used here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-25 19:15:34 -04:00
..
man generated man pages: use xorg footer and no hard coded extension 2014-01-30 12:10:06 +09:00
.gitignore Add Present extension 2013-11-07 14:02:37 -08:00
Makefile.am generated man pages: use xorg footer and no hard coded extension 2014-01-30 12:10:06 +09:00
c_client.py support switch case in the generator 2014-08-20 11:59:04 -04:00
xcb.h xcb.h: add 'struct' before xcb_setup_t, xcb_query_extension_reply_t 2014-07-28 20:36:32 +02:00
xcb_auth.c Remove tabs and trailing whitespaces 2014-03-21 14:35:16 +01:00
xcb_conn.c Make some functions also work on error connections 2014-08-25 19:15:34 -04:00
xcb_ext.c Always include "config.h" at the start of all C source files. 2012-08-25 12:34:24 -07:00
xcb_in.c bug#79986: include system headers early 2014-06-14 08:24:37 -07:00
xcb_list.c Define _xcb_map_new with explicit void arg list instead of empty one 2013-08-06 11:10:01 -07:00
xcb_out.c Ensure xcb owns socket and no other threads are writing before send_request 2014-03-30 22:15:38 +02:00
xcb_util.c xcb_open: Improve abstraction for launchd secure sockets 2014-04-10 09:50:57 -07:00
xcb_windefs.h Remove tabs and trailing whitespaces 2014-03-21 14:35:16 +01:00
xcb_xid.c Always include "config.h" at the start of all C source files. 2012-08-25 12:34:24 -07:00
xcbext.h Add doxygen documentation to functions in xcbext.h 2014-03-21 14:44:22 +01:00
xcbint.h Remove tabs and trailing whitespaces 2014-03-21 14:35:16 +01:00