From b9f6ead9f563a1eff3bf3b93b2264a95baea2aaf Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 19 May 2022 17:02:38 +0800 Subject: [PATCH] Fix error handling when allowing touch events * src/xterm.c (handle_one_xevent): Catch errors correctly when linking touch points. --- src/xterm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index 142c2f81ce7..48329a2fcaa 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -19558,6 +19558,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (!menu_bar_p && !tool_bar_p) { + x_catch_errors (dpyinfo->display); + if (f && device->direct_p) { *finish = X_EVENT_DROP; @@ -19586,6 +19588,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XIAllowTouchEvents (dpyinfo->display, xev->deviceid, xev->detail, xev->event, XIRejectTouch); #endif + x_uncatch_errors (); } else { -- 2.39.2