From 7d85639cc46e28dfed4df1d91691ca53cacec5e6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Nov 2017 14:32:37 +0100 Subject: X RAndR: Fix connection failure detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/lib/gamma-x-randr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/gamma-x-randr.c b/src/lib/gamma-x-randr.c index 9e8a8a0..fb002fc 100644 --- a/src/lib/gamma-x-randr.c +++ b/src/lib/gamma-x-randr.c @@ -195,7 +195,7 @@ int libgamma_x_randr_site_initialise(libgamma_site_state_t* restrict this, /* Connect to the display server. */ this->data = connection = xcb_connect(site, NULL); - if (connection == NULL) + if (connection == NULL || xcb_connection_has_error(connection)) return LIBGAMMA_OPEN_SITE_FAILED; /* Query the version of the X RandR extension protocol. */ -- cgit v1.2.3-70-g09d2