unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: david.ponce@wanadoo.fr, emacs-devel@gnu.org
Subject: Re: [hober0@bogus.example.com: Re: mode-line redisplay bug]
Date: Thu, 13 Oct 2005 17:22:35 +0900	[thread overview]
Message-ID: <wlachdvnas.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <m3k6giam2g.fsf@kfs-l.imdomain.dk>

>>>>> On Wed, 12 Oct 2005 15:42:31 +0200, storm@cua.dk (Kim F. Storm) said:

> I think your change was pretty close to being ok.  Here is something
> which seems to work for me on X -- maybe you can install it and
> adapt it to W32 and MAC if it works for you too.

The same change seems to work for Mac, too.  Thanks.  I'm not sure
about W32: it looks slightly different from others (help_echo_string
is not cleared before note_mouse_movement is called).

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

Index: src/macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.137
diff -c -r1.137 macterm.c
*** src/macterm.c	12 Oct 2005 12:18:18 -0000	1.137
--- src/macterm.c	13 Oct 2005 08:04:17 -0000
***************
*** 4149,4155 ****
  static Point last_mouse_motion_position;
  static Lisp_Object last_mouse_motion_frame;
  
! static void
  note_mouse_movement (frame, pos)
       FRAME_PTR frame;
       Point *pos;
--- 4149,4155 ----
  static Point last_mouse_motion_position;
  static Lisp_Object last_mouse_motion_frame;
  
! static int
  note_mouse_movement (frame, pos)
       FRAME_PTR frame;
       Point *pos;
***************
*** 4180,4198 ****
  	    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?  */
!   else if (pos->h < last_mouse_glyph.left
! 	   || pos->h >= last_mouse_glyph.right
! 	   || pos->v < last_mouse_glyph.top
! 	   || pos->v >= last_mouse_glyph.bottom)
      {
        frame->mouse_moved = 1;
        last_mouse_scroll_bar = Qnil;
        note_mouse_highlight (frame, pos->h, pos->v);
        /* Remember which glyph we're now on.  */
        remember_mouse_glyph (frame, pos->h, pos->v, &last_mouse_glyph);
      }
  }
  
  \f
--- 4180,4201 ----
  	    rif->define_frame_cursor (frame,
  				      frame->output_data.mac->nontext_cursor);
  	}
+       return 1;
      }
    /* Has the mouse moved off the glyph it was on at the last sighting?  */
!   if (pos->h < last_mouse_glyph.left
!       || pos->h >= last_mouse_glyph.right
!       || pos->v < last_mouse_glyph.top
!       || pos->v >= last_mouse_glyph.bottom)
      {
        frame->mouse_moved = 1;
        last_mouse_scroll_bar = Qnil;
        note_mouse_highlight (frame, pos->h, pos->v);
        /* Remember which glyph we're now on.  */
        remember_mouse_glyph (frame, pos->h, pos->v, &last_mouse_glyph);
+       return 1;
      }
+   return 0;
  }
  
  \f
***************
*** 10031,10038 ****
  			  er.where.h + 1, er.where.v + 1);
  #endif
  	      previous_help_echo_string = help_echo_string;
! 	      help_echo_string = help_echo_object = help_echo_window = Qnil;
! 	      help_echo_pos = -1;
  
  	      if (dpyinfo->grabbed && last_mouse_frame
  		  && FRAME_LIVE_P (last_mouse_frame))
--- 10034,10040 ----
  			  er.where.h + 1, er.where.v + 1);
  #endif
  	      previous_help_echo_string = help_echo_string;
! 	      help_echo_string = Qnil;
  
  	      if (dpyinfo->grabbed && last_mouse_frame
  		  && FRAME_LIVE_P (last_mouse_frame))
***************
*** 10091,10097 ****
  
  			  last_window=window;
  			}
! 		      note_mouse_movement (f, &mouse_pos);
  		    }
  		}
  
--- 10093,10100 ----
  
  			  last_window=window;
  			}
! 		      if (!note_mouse_movement (f, &mouse_pos))
! 			help_echo_string = previous_help_echo_string;
  		    }
  		}

  parent reply	other threads:[~2005-10-13  8:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-12 11:47 [hober0@bogus.example.com: Re: mode-line redisplay bug] David PONCE
2005-10-12 12:22 ` YAMAMOTO Mitsuharu
2005-10-12 13:42   ` Kim F. Storm
2005-10-12 14:55     ` David Ponce
2005-10-13  8:22     ` YAMAMOTO Mitsuharu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-12 11:37 David PONCE
2005-10-12 10:57 David PONCE
2005-10-12 11:20 ` YAMAMOTO Mitsuharu
2005-10-12 11:44   ` Kim F. Storm
2005-10-12 12:52     ` YAMAMOTO Mitsuharu
2005-10-12 13:40       ` Kim F. Storm
2005-10-13  8:21         ` YAMAMOTO Mitsuharu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlachdvnas.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=david.ponce@wanadoo.fr \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).