]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix error handling when allowing touch events
authorPo Lu <luangruo@yahoo.com>
Thu, 19 May 2022 09:02:38 +0000 (17:02 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 19 May 2022 09:04:07 +0000 (17:04 +0800)
* src/xterm.c (handle_one_xevent): Catch errors correctly when
linking touch points.

src/xterm.c

index 142c2f81ce74d276eafa1509fedcbf149111ecbe..48329a2fcaa4600fb4c387a9731bde0089652c4a 100644 (file)
@@ -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
                {