diff options
author | Miles Bader <miles@gnu.org> | 1996-07-07 01:59:28 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-07-07 01:59:28 +0000 |
commit | 89e05792e3b010dc9114dd18143d1676300a6cde (patch) | |
tree | d203f61923bbd92f7eeb5133e86f06e719dbef43 /src/w32term.c | |
parent | 87d9ffbd255b2f04fffd4922be8efc28dccaf804 (diff) | |
download | emacs-89e05792e3b010dc9114dd18143d1676300a6cde.tar.gz |
(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.c | 35 |
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) /* 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 @@ x_set_mouse_position (f, x, y) 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. */ |