From 6a669a87754241a27c8d06495acf66abe80d0248 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 16 Nov 2013 11:28:27 +0100 Subject: [PATCH] Print libxcb error codes for broken connections Signed-off-by: Uli Schlachter --- awesome.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awesome.c b/awesome.c index 6a2cf98df..665e43a93 100644 --- a/awesome.c +++ b/awesome.c @@ -207,7 +207,8 @@ a_xcb_io_cb(GIOChannel *source, GIOCondition cond, gpointer data) /* a_xcb_check() already handled all events */ if(xcb_connection_has_error(globalconf.connection)) - fatal("X server connection broke"); + fatal("X server connection broke (error %d)", + xcb_connection_has_error(globalconf.connection)); return TRUE; } @@ -381,7 +382,7 @@ main(int argc, char **argv) /* X stuff */ globalconf.connection = xcb_connect(NULL, &globalconf.default_screen); if(xcb_connection_has_error(globalconf.connection)) - fatal("cannot open display"); + fatal("cannot open display (error %d)", xcb_connection_has_error(globalconf.connection)); globalconf.screen = xcb_aux_get_screen(globalconf.connection, globalconf.default_screen); globalconf.default_visual = draw_default_visual(globalconf.screen);