misc: make use of the xcb-aux library

This commit is contained in:
Daniel Eklöf 2019-01-19 18:46:20 +01:00
parent 9d5bbe0566
commit dff3104c85
5 changed files with 17 additions and 40 deletions

View file

@ -614,8 +614,9 @@ static int
run(struct module *mod)
{
xcb_connection_t *conn = xcb_connect(NULL, NULL);
if (conn == NULL) {
if (xcb_connection_has_error(conn) > 0) {
LOG_ERR("failed to connect to X server");
xcb_disconnect(conn);
return EXIT_FAILURE;
}