From 7898cc7de74ab760b64fb8aba5c6f05434909ad8 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 13 Nov 2010 22:29:05 +0100 Subject: [PATCH] Properly die when the X server dies When the X connection breaks for whatever reason, awesome wouldn't properly exit, but go into a busy loop instead. Fix this by dying when our connection to the X server dies. Signed-off-by: Uli Schlachter --- awesome.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awesome.c b/awesome.c index b25cb3ff..5b2356a7 100644 --- a/awesome.c +++ b/awesome.c @@ -249,7 +249,10 @@ a_xcb_check_cb(EV_P_ ev_check *w, int revents) static void a_xcb_io_cb(EV_P_ ev_io *w, int revents) { - /* empty */ + /* a_xcb_check_cb() already handled all events */ + + if(xcb_connection_has_error(globalconf.connection)) + fatal("X server connection broke"); } static void