summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2006-03-12 14:56:54 +0000
committerJason Rumney <jasonr@gnu.org>2006-03-12 14:56:54 +0000
commitd3499758a9e5912ee6f47a70abc22b579380f11a (patch)
tree6e3921381a40b4ba96e7d157ec3486dd18777a0b /src
parent516b77a3b23f6e01b52317ee4474042579ef1c72 (diff)
downloademacs-d3499758a9e5912ee6f47a70abc22b579380f11a.tar.gz
emacs-d3499758a9e5912ee6f47a70abc22b579380f11a.tar.bz2
emacs-d3499758a9e5912ee6f47a70abc22b579380f11a.zip
Sync 2005-10-24 xterm.c changes.
(last_mouse_glyph_frame): New var. (note_mouse_movement): Say mouse moved if current frame differs from last_mouse_glyph_frame, and update last_mouse_glyph_frame. (w32_mouse_position): Set last_mouse_glyph_frame. Remove OLD_REDISPLAY_CODE block.
Diffstat (limited to 'src')
-rw-r--r--src/w32term.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 3ffe00dd314..7d530e7ea65 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -183,6 +183,7 @@ int last_scroll_bar_drag_pos;
/* Where the mouse was last time we reported a mouse event. */
static RECT last_mouse_glyph;
+static FRAME_PTR last_mouse_glyph_frame;
static Lisp_Object last_mouse_press_frame;
int w32_num_mouse_buttons;
@@ -3221,11 +3222,13 @@ note_mouse_movement (frame, msg)
frame->mouse_moved = 1;
last_mouse_scroll_bar = Qnil;
note_mouse_highlight (frame, -1, -1);
+ last_mouse_glyph_frame = 0;
return 1;
}
/* Has the mouse moved off the glyph it was on at the last sighting? */
- if (mouse_x < last_mouse_glyph.left
+ if (frame != last_mouse_glyph_frame
+ || mouse_x < last_mouse_glyph.left
|| mouse_x >= last_mouse_glyph.right
|| mouse_y < last_mouse_glyph.top
|| mouse_y >= last_mouse_glyph.bottom)
@@ -3238,6 +3241,7 @@ note_mouse_movement (frame, msg)
to keep track of the mouse for help_echo and highlighting at
other times. */
remember_mouse_glyph (frame, mouse_x, mouse_y, &last_mouse_glyph);
+ last_mouse_glyph_frame = frame;
return 1;
}
@@ -3361,19 +3365,9 @@ w32_mouse_position (fp, insist, bar_window, part, x, y, time)
on it, i.e. into the same rectangles that matrices on
the frame are divided into. */
-#if OLD_REDISPLAY_CODE
- int ignore1, ignore2;
-
- ScreenToClient (FRAME_W32_WINDOW (f1), &pt);
-
- pixel_to_glyph_coords (f1, pt.x, pt.y, &ignore1, &ignore2,
- &last_mouse_glyph,
- FRAME_W32_DISPLAY_INFO (f1)->grabbed
- || insist);
-#else
ScreenToClient (FRAME_W32_WINDOW (f1), &pt);
remember_mouse_glyph (f1, pt.x, pt.y, &last_mouse_glyph);
-#endif
+ last_mouse_glyph_frame = f1;
*bar_window = Qnil;
*part = 0;