diff options
| author | Dmitry Antipov | 2013-09-18 13:23:10 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-09-18 13:23:10 +0400 |
| commit | 18da0d8ad4e5036185acbad3238cbfe2aaf3ca66 (patch) | |
| tree | 7dc7f25186e10dd1c767d1dbf26268b8c70e1a51 /src/frame.c | |
| parent | 7a0c745ad134aff0bb8f4258ea607137a819b58d (diff) | |
| download | emacs-18da0d8ad4e5036185acbad3238cbfe2aaf3ca66.tar.gz emacs-18da0d8ad4e5036185acbad3238cbfe2aaf3ca66.zip | |
* frame.c (x_redo_mouse_highlight): New function
to factor out common code used in W32 and X ports.
* dispextern.h (x_redo_mouse_highlight): Add prototype.
* xterm.h (struct x_display_info):
* w32term.h (struct w32_display_info):
* nsterm.h (struct ns_display_info): New members
last_mouse_motion_frame, last_mouse_motion_x and
last_mouse_motion_y, going to replace static variables below.
* xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
(redo_mouse_highlight): Remove.
(note_mouse_movement, syms_of_xterm): Adjust user.
(handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
* w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
(redo_mouse_highlight): Remove.
(note_mouse_movement, syms_of_w32term): Adjust user.
(w32_read_socket): Likewise. Use x_redo_mouse_highlight.
* nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
Remove.
(note_mouse_movement, mouseMoved, syms_of_nsterm):
* nsfns.m (compute_tip_xy): Adjust user.
Diffstat (limited to 'src/frame.c')
| -rw-r--r-- | src/frame.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c index a31bf35aa6b..997cc9c73ae 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3442,6 +3442,19 @@ bool x_mouse_grabbed (Display_Info *dpyinfo) | |||
| 3442 | && FRAME_LIVE_P (dpyinfo->last_mouse_frame)); | 3442 | && FRAME_LIVE_P (dpyinfo->last_mouse_frame)); |
| 3443 | } | 3443 | } |
| 3444 | 3444 | ||
| 3445 | /* Re-highlight something with mouse-face properties | ||
| 3446 | on DPYINFO using saved frame and mouse position. */ | ||
| 3447 | |||
| 3448 | void | ||
| 3449 | x_redo_mouse_highlight (Display_Info *dpyinfo) | ||
| 3450 | { | ||
| 3451 | if (dpyinfo->last_mouse_motion_frame | ||
| 3452 | && FRAME_LIVE_P (dpyinfo->last_mouse_motion_frame)) | ||
| 3453 | note_mouse_highlight (dpyinfo->last_mouse_motion_frame, | ||
| 3454 | dpyinfo->last_mouse_motion_x, | ||
| 3455 | dpyinfo->last_mouse_motion_y); | ||
| 3456 | } | ||
| 3457 | |||
| 3445 | /* Subroutines of creating an X frame. */ | 3458 | /* Subroutines of creating an X frame. */ |
| 3446 | 3459 | ||
| 3447 | /* Make sure that Vx_resource_name is set to a reasonable value. | 3460 | /* Make sure that Vx_resource_name is set to a reasonable value. |