diff options
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/xterm.c b/src/xterm.c index ed5d0382eae..83d3cb1ab73 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8735,34 +8735,11 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b unblock_input (); } - -/* Mouse warping. */ - -void -x_set_mouse_position (struct frame *f, int x, int y) -{ - int pix_x, pix_y; - - pix_x = FRAME_COL_TO_PIXEL_X (f, x) + FRAME_COLUMN_WIDTH (f) / 2; - pix_y = FRAME_LINE_TO_PIXEL_Y (f, y) + FRAME_LINE_HEIGHT (f) / 2; - - if (pix_x < 0) pix_x = 0; - if (pix_x > FRAME_PIXEL_WIDTH (f)) pix_x = FRAME_PIXEL_WIDTH (f); - - if (pix_y < 0) pix_y = 0; - if (pix_y > FRAME_PIXEL_HEIGHT (f)) pix_y = FRAME_PIXEL_HEIGHT (f); - - block_input (); - - XWarpPointer (FRAME_X_DISPLAY (f), None, FRAME_X_WINDOW (f), - 0, 0, 0, 0, pix_x, pix_y); - unblock_input (); -} /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */ void -x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) +frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) { block_input (); |