From 3ba7a2aa4d53451c72e73575c384ca802cca12bb Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 28 Mar 2020 00:18:07 +0000 Subject: [PATCH] core: failed to ungrab server should be fatal Signed-off-by: Yuxuan Shui --- src/picom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/picom.c b/src/picom.c index 9d2e93b..efd8186 100644 --- a/src/picom.c +++ b/src/picom.c @@ -2096,7 +2096,8 @@ static session_t *session_init(int argc, char **argv, Display *dpy, e = xcb_request_check(ps->c, xcb_grab_server_checked(ps->c)); if (e) { - log_fatal("Failed to grab X server"); + log_fatal_x_error(e, "Failed to grab X server"); + free(e); goto err; } @@ -2113,8 +2114,9 @@ static session_t *session_init(int argc, char **argv, Display *dpy, e = xcb_request_check(ps->c, xcb_ungrab_server(ps->c)); if (e) { - log_error_x_error(e, "Failed to ungrab server"); + log_fatal_x_error(e, "Failed to ungrab server"); free(e); + goto err; } ps->server_grabbed = false;