summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xterm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 342f2b044f9..b1d9ca7361b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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