]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/xterm.c (frame_set_mouse_pixel_position): Avoid server grab.
authorPo Lu <luangruo@yahoo.com>
Tue, 12 Apr 2022 04:01:34 +0000 (12:01 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 12 Apr 2022 04:01:34 +0000 (12:01 +0800)
src/xterm.c

index 342f2b044f98037122f14642ffebbbbdd57de42f..b1d9ca7361bbbc55abf57a277eeca386dd2084c8 100644 (file)
@@ -20850,16 +20850,17 @@ frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
 
   if (FRAME_DISPLAY_INFO (f)->supports_xi2)
     {
-      XGrabServer (FRAME_X_DISPLAY (f));
-      if (XIGetClientPointer (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+      if (XIGetClientPointer (FRAME_X_DISPLAY (f),
+                             FRAME_X_WINDOW (f),
                              &deviceid))
        {
+         x_catch_errors (FRAME_X_DISPLAY (f));
          XIWarpPointer (FRAME_X_DISPLAY (f),
                         deviceid, None,
                         FRAME_X_WINDOW (f),
                         0, 0, 0, 0, pix_x, pix_y);
+         x_uncatch_errors ();
        }
-      XUngrabServer (FRAME_X_DISPLAY (f));
     }
   else
 #endif