aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorMiles Bader1996-07-07 01:59:28 +0000
committerMiles Bader1996-07-07 01:59:28 +0000
commit1bcd16f2c1ccfd7700c88da7311cf2020fbc96ca (patch)
treeb23ed5dd4bd6aec2d6f7a3bb3066f4b277af0c71 /src/w32term.c
parent5162ffce812c6639db8c34e27be839b1d4bc73d2 (diff)
downloademacs-1bcd16f2c1ccfd7700c88da7311cf2020fbc96ca.tar.gz
emacs-1bcd16f2c1ccfd7700c88da7311cf2020fbc96ca.zip
(x_set_mouse_pixel_position): Adjust coords by frame position.
(x_set_mouse_position): Call x_set_mouse_pixel_position.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/w32term.c b/src/w32term.c
index e0f840999a0..d169be20d38 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -3317,6 +3317,21 @@ x_set_window_size (f, change_gravity, cols, rows)
3317/* Mouse warping. */ 3317/* Mouse warping. */
3318 3318
3319void 3319void
3320x_set_mouse_pixel_position (f, pix_x, pix_y)
3321 struct frame *f;
3322 int pix_x, pix_y;
3323{
3324 BLOCK_INPUT;
3325
3326 pix_x += f->output_data.win32->left_pos;
3327 pix_y += f->output_data.win32->top_pos;
3328
3329 SetCursorPos (pix_x, pix_y);
3330
3331 UNBLOCK_INPUT;
3332}
3333
3334void
3320x_set_mouse_position (f, x, y) 3335x_set_mouse_position (f, x, y)
3321 struct frame *f; 3336 struct frame *f;
3322 int x, y; 3337 int x, y;
@@ -3332,25 +3347,7 @@ x_set_mouse_position (f, x, y)
3332 if (pix_y < 0) pix_y = 0; 3347 if (pix_y < 0) pix_y = 0;
3333 if (pix_y > PIXEL_HEIGHT (f)) pix_y = PIXEL_HEIGHT (f); 3348 if (pix_y > PIXEL_HEIGHT (f)) pix_y = PIXEL_HEIGHT (f);
3334 3349
3335 BLOCK_INPUT; 3350 x_set_mouse_pixel_position (f, pix_x, pix_y);
3336
3337 SetCursorPos (pix_x, pix_y);
3338
3339 UNBLOCK_INPUT;
3340}
3341
3342/* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */
3343
3344void
3345x_set_mouse_pixel_position (f, pix_x, pix_y)
3346 struct frame *f;
3347 int pix_x, pix_y;
3348{
3349 BLOCK_INPUT;
3350
3351 SetCursorPos (pix_x, pix_y);
3352
3353 UNBLOCK_INPUT;
3354} 3351}
3355 3352
3356/* focus shifting, raising and lowering. */ 3353/* focus shifting, raising and lowering. */