Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1bcd16f2
Commit
1bcd16f2
authored
Jul 07, 1996
by
Miles Bader
Browse files
(x_set_mouse_pixel_position): Adjust coords by frame position.
(x_set_mouse_position): Call x_set_mouse_pixel_position.
parent
5162ffce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
src/w32term.c
src/w32term.c
+16
-19
No files found.
src/w32term.c
View file @
1bcd16f2
...
...
@@ -3316,6 +3316,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
;
...
...
@@ -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. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment