diff src/w32term.c @ 83492:203c9b24206b

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-153 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-154 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-155 Remove nick-abbrevs stuff from rcirc.el * emacs@sv.gnu.org/emacs--devo--0--patch-156 rcirc.el update from Ryan Yeske * emacs@sv.gnu.org/emacs--devo--0--patch-157 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-158 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-159 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-532
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 15 Mar 2006 17:22:12 +0000
parents 0cdee8b991e1 eb7a171cafae
children c1e013e3dc0e
line wrap: on
line diff
--- a/src/w32term.c	Sun Mar 12 05:02:59 2006 +0000
+++ b/src/w32term.c	Wed Mar 15 17:22:12 2006 +0000
@@ -183,6 +183,7 @@
 /* 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 @@
       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 @@
 	 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 @@
 	       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;