Commit graph

12 commits

Author SHA1 Message Date
Daniel Eklöf
9d5bbe0566 misc: xcb_connect() always returns a non-NULL pointer
Instead, we need to check if xcb_connection_has_error() says something
went wrong. We also need to call xcb_disconnect() on the disfunctional
XCB connection object.
2019-01-19 18:45:15 +01:00
Daniel Eklöf
7bb849bdf4 xcb: use strncpy() to extract atom name 2019-01-19 12:18:54 +01:00
Daniel Eklöf
64c366c051 xcb: cleanup err message generated by xcb_error() 2019-01-16 19:02:32 +01:00
Daniel Eklöf
77f8e6fa28 xcb: xcb_error() no longer prefixes error message with "XCB: " 2019-01-16 16:27:25 +01:00
Daniel Eklöf
fae2e5cb18 xcb: add xcb_error(), a generic describe-an-x-error function
By default, generates an error message with the major/minor opcodes,
the error code and sequence number.

If available, it will use xcb-errors to generate an even better
description.
2019-01-15 20:44:21 +01:00
Daniel Eklöf
c3930ef60a xcb: create atom if it doesn't exist
Fixes a bug where not all atoms have (yet) been created when starting
f00bar as part of the WM startup (for example, with an 'exec' in i3's
config).
2019-01-15 19:14:52 +01:00
Daniel Eklöf
b52bdf14b2 xcb: log version info as debug, rather than info 2019-01-09 18:29:51 +01:00
Daniel Eklöf
28b0f150cd xcb: replace asserts with error checks 2019-01-01 20:32:03 +01:00
Daniel Eklöf
f1cd75ecb9 xcb: use new log framework 2018-12-17 20:25:27 +01:00
Daniel Eklöf
9dd179ca67 xcb: no need to heap allocate a buffer for the vendor string 2018-11-17 13:36:09 +01:00
Daniel Eklöf
7c468c20c0 xcb: add xcb_init(): checks the x server + extensions, and caches atoms 2018-11-17 11:47:34 +01:00
Daniel Eklöf
8bf8a398b9 initial commit: wip 2018-11-17 11:30:33 +01:00