From: Ingo Bürk Date: Thu, 3 Dec 2015 17:59:35 +0000 (+0100) Subject: Fail gracefully when the gc cannot be created X-Git-Tag: 4.12~94^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=35a4e22f4a94d06d54a2cfca0932bb3906d897f5;p=i3%2Fi3 Fail gracefully when the gc cannot be created We now only log an error but do not exit when creating the graphics context fails. While, if this happens, rendering will likely be wrong, this is still better than terminating the user's session entirely due to a rendering problem, potentially causing data loss. relates to #2094 --- diff --git a/libi3/draw_util.c b/libi3/draw_util.c index e33a9ecb..fa538d1a 100644 --- a/libi3/draw_util.c +++ b/libi3/draw_util.c @@ -47,8 +47,7 @@ void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_draw xcb_generic_error_t *error = xcb_request_check(conn, gc_cookie); if (error != NULL) { - ELOG("Could not create graphical context. Error code: %d\n", error->error_code); - exit(EXIT_FAILURE); + ELOG("Could not create graphical context. Error code: %d. Please report this bug.\n", error->error_code); } #ifdef CAIRO_SUPPORT