From 760fd43082975ba9400d846b87e2016f43e98c85 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 2 Jun 2022 16:36:03 +0800 Subject: [PATCH] Fix rare crash when async input happens while creating xm drag window * src/xterm.c (xm_get_drag_window): Work around XCloseDisplay freezing upon being interrupted by a signal. --- src/xterm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index f280fea4cb9..d0aa8874b6b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1744,7 +1744,12 @@ xm_get_drag_window (struct x_display_info *dpyinfo) (unsigned char *) &drag_window, 1); } + /* FIXME: why does XCloseDisplay hang if SIGIO arrives and there + are multiple displays? */ + unrequest_sigio (); XCloseDisplay (temp_display); + request_sigio (); + XSetErrorHandler (old_handler); XSetIOErrorHandler (old_io_handler); -- 2.39.2