changeset 15616:a73836346910

(x_set_mouse_pixel_position): Adjust coords by frame position. (x_set_mouse_position): Call x_set_mouse_pixel_position.
author Miles Bader <miles@gnu.org>
date Sun, 07 Jul 1996 01:59:28 +0000
parents 124e347ce827
children 69c516d109e7
files src/w32term.c
diffstat 1 files changed, 16 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Sun Jul 07 01:59:24 1996 +0000
+++ b/src/w32term.c	Sun Jul 07 01:59:28 1996 +0000
@@ -3317,6 +3317,21 @@
 /* Mouse warping.  */
 
 void
+x_set_mouse_pixel_position (f, pix_x, pix_y)
+     struct frame *f;
+     int pix_x, pix_y;
+{
+  BLOCK_INPUT;
+
+  pix_x += f->output_data.win32->left_pos;
+  pix_y += f->output_data.win32->top_pos;
+
+  SetCursorPos (pix_x, pix_y);
+
+  UNBLOCK_INPUT;
+}
+
+void
 x_set_mouse_position (f, x, y)
      struct frame *f;
      int x, y;
@@ -3332,25 +3347,7 @@
   if (pix_y < 0) pix_y = 0;
   if (pix_y > PIXEL_HEIGHT (f)) pix_y = PIXEL_HEIGHT (f);
 
-  BLOCK_INPUT;
-
-  SetCursorPos (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 (f, pix_x, pix_y)
-     struct frame *f;
-     int pix_x, pix_y;
-{
-  BLOCK_INPUT;
-
-  SetCursorPos (pix_x, pix_y);
-
-  UNBLOCK_INPUT;
+  x_set_mouse_pixel_position (f, pix_x, pix_y);
 }
 
 /* focus shifting, raising and lowering.  */