Commit bb1424e9 authored by Olivier Fourdan's avatar Olivier Fourdan 🛠

client: Protect against XError in XKillClient()

The client might be gone, and trying to kill the X11 client might cause
an unhandled XError.

Make sure to protect XKillClient against XError.
Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <>
Closes: #453
parent 1e80481a
Pipeline #3872 passed with stages
in 2 minutes and 58 seconds
......@@ -2712,10 +2712,18 @@ clientClose (Client *c)
clientKill (Client *c)
ScreenInfo *screen_info;
DisplayInfo *display_info;
g_return_if_fail (c != NULL);
TRACE ("client \"%s\" (0x%lx)", c->name, c->window);
XKillClient (clientGetXDisplay (c), c->window);
screen_info = c->screen_info;
display_info = screen_info->display_info;
myDisplayErrorTrapPush (display_info);
XKillClient (display_info->dpy, c->window);
myDisplayErrorTrapPopIgnored (display_info);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment