diff options
author | Jason Rumney <jasonr@gnu.org> | 2002-12-12 19:56:41 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2002-12-12 19:56:41 +0000 |
commit | 706ddb8f9a2b4817c60501b27de0af41844a2b4f (patch) | |
tree | b3edea737b6037186b3b3b00df9d4f789e3f7745 | |
parent | 96720f09ea540774b650385a2d56a789fadbe972 (diff) | |
download | emacs-706ddb8f9a2b4817c60501b27de0af41844a2b4f.tar.gz |
(last_mousemove_x, last_mousemove_y): New variables.
(w32_read_socket) <WM_MOUSEMOVE>: Use them to detect non-movement.
Be more careful about when help_events are generated.
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/w32term.c | 25 |
2 files changed, 27 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 24970fa927f..ba7e2b9d486 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-12-12 Jason Rumney <jasonr@gnu.org> + + * w32term.c (last_mousemove_x, last_mousemove_y): New variables. + (w32_read_socket) <WM_MOUSEMOVE>: Use them to detect non-movement. + Be more careful about when help_events are generated. + 2002-12-12 Steven Tamm <steventamm@mac.com> * macterm.c (mac_check_for_quit_char): Correctly set the diff --git a/src/w32term.c b/src/w32term.c index 84c9a3c1acd..73740b2555f 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -161,9 +161,11 @@ static Lisp_Object help_echo_window; static Lisp_Object help_echo_object; static int help_echo_pos; -/* Temporary variable for w32_read_socket. */ +/* Temporary variables for w32_read_socket. */ static Lisp_Object previous_help_echo; +static int last_mousemove_x = 0; +static int last_mousemove_y = 0; /* Non-zero means that a HELP_EVENT has been generated since Emacs start. */ @@ -8766,9 +8768,17 @@ w32_read_socket (sd, bufp, numchars, expected) break; case WM_MOUSEMOVE: + /* Ignore non-movement. */ + { + int x = LOWORD (msg.msg.lParam); + int y = HIWORD (msg.msg.lParam); + if (x == last_mousemove_x && y == last_mousemove_y) + break; + last_mousemove_x = x; + last_mousemove_y = y; + } + previous_help_echo = help_echo; - help_echo_object = help_echo_window = Qnil; - help_echo_pos = -1; if (dpyinfo->grabbed && last_mouse_frame && FRAME_LIVE_P (last_mouse_frame)) @@ -8793,11 +8803,18 @@ w32_read_socket (sd, bufp, numchars, expected) /* If the contents of the global variable help_echo has changed, generate a HELP_EVENT. */ - if (help_echo != previous_help_echo) + if (help_echo != previous_help_echo || + (!NILP (help_echo) && !STRINGP (help_echo) && f->mouse_moved)) { Lisp_Object frame; int n; + if (help_echo == Qnil) + { + help_echo_object = help_echo_window = Qnil; + help_echo_pos = -1; + } + if (f) XSETFRAME (frame, f); else |