changeset 76535:12069a316614

(note_mouse_movement): Don't return immediately for LeaveNotify case.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Sun, 18 Mar 2007 08:06:38 +0000
parents 388ed021f559
children a06d7221f4cd
files src/macterm.c
diffstat 1 files changed, 16 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/macterm.c	Sun Mar 18 08:06:18 2007 +0000
+++ b/src/macterm.c	Sun Mar 18 08:06:38 2007 +0000
@@ -4484,25 +4484,24 @@
   last_mouse_motion_position = *pos;
   XSETFRAME (last_mouse_motion_frame, frame);
 
+  if (frame == dpyinfo->mouse_face_mouse_frame
 #if TARGET_API_MAC_CARBON
-  if (!PtInRect (*pos, GetWindowPortBounds (FRAME_MAC_WINDOW (frame), &r)))
+      && !PtInRect (*pos, GetWindowPortBounds (FRAME_MAC_WINDOW (frame), &r))
 #else
-  if (!PtInRect (*pos, &FRAME_MAC_WINDOW (frame)->portRect))
-#endif
-    {
-      if (frame == dpyinfo->mouse_face_mouse_frame)
-	/* This case corresponds to LeaveNotify in X11.  */
-	{
-	  /* If we move outside the frame, then we're certainly no
-	     longer on any text in the frame.  */
-	  clear_mouse_face (dpyinfo);
-	  dpyinfo->mouse_face_mouse_frame = 0;
-	  if (!dpyinfo->grabbed)
-	    rif->define_frame_cursor (frame,
-				      frame->output_data.mac->nontext_cursor);
-	}
-      return 1;
-    }
+      && !PtInRect (*pos, &FRAME_MAC_WINDOW (frame)->portRect)
+#endif
+      )
+    {
+      /* This case corresponds to LeaveNotify in X11.  If we move
+	 outside the frame, then we're certainly no longer on any text
+	 in the frame.  */
+      clear_mouse_face (dpyinfo);
+      dpyinfo->mouse_face_mouse_frame = 0;
+      if (!dpyinfo->grabbed)
+	rif->define_frame_cursor (frame,
+				  frame->output_data.mac->nontext_cursor);
+    }
+
   /* Has the mouse moved off the glyph it was on at the last sighting?  */
   if (frame != last_mouse_glyph_frame
       || !PtInRect (*pos, &last_mouse_glyph))