diff options
author | Uli Schlachter <psychon@znc.in> | 2014-08-18 10:38:41 +0200 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2014-08-25 19:15:34 -0400 |
commit | c4e40f646b8da4fd112ea54a612c880be5e942a8 (patch) | |
tree | 2a9b8a2d9e48e6ce4c1df70a49084cce3827e997 /xcb-render.pc.in | |
parent | 355d4d6ab9f5c12c2ee4a91e8cf6eb4a2854d73c (diff) |
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>
Diffstat (limited to 'xcb-render.pc.in')
0 files changed, 0 insertions, 0 deletions