diff options
| author | Jason Rumney | 2002-12-12 19:56:41 +0000 |
|---|---|---|
| committer | Jason Rumney | 2002-12-12 19:56:41 +0000 |
| commit | 706ddb8f9a2b4817c60501b27de0af41844a2b4f (patch) | |
| tree | b3edea737b6037186b3b3b00df9d4f789e3f7745 /src | |
| parent | 96720f09ea540774b650385a2d56a789fadbe972 (diff) | |
| download | emacs-706ddb8f9a2b4817c60501b27de0af41844a2b4f.tar.gz emacs-706ddb8f9a2b4817c60501b27de0af41844a2b4f.zip | |
(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.
Diffstat (limited to 'src')
| -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 @@ | |||
| 1 | 2002-12-12 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32term.c (last_mousemove_x, last_mousemove_y): New variables. | ||
| 4 | (w32_read_socket) <WM_MOUSEMOVE>: Use them to detect non-movement. | ||
| 5 | Be more careful about when help_events are generated. | ||
| 6 | |||
| 1 | 2002-12-12 Steven Tamm <steventamm@mac.com> | 7 | 2002-12-12 Steven Tamm <steventamm@mac.com> |
| 2 | 8 | ||
| 3 | * macterm.c (mac_check_for_quit_char): Correctly set the | 9 | * 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; | |||
| 161 | static Lisp_Object help_echo_object; | 161 | static Lisp_Object help_echo_object; |
| 162 | static int help_echo_pos; | 162 | static int help_echo_pos; |
| 163 | 163 | ||
| 164 | /* Temporary variable for w32_read_socket. */ | 164 | /* Temporary variables for w32_read_socket. */ |
| 165 | 165 | ||
| 166 | static Lisp_Object previous_help_echo; | 166 | static Lisp_Object previous_help_echo; |
| 167 | static int last_mousemove_x = 0; | ||
| 168 | static int last_mousemove_y = 0; | ||
| 167 | 169 | ||
| 168 | /* Non-zero means that a HELP_EVENT has been generated since Emacs | 170 | /* Non-zero means that a HELP_EVENT has been generated since Emacs |
| 169 | start. */ | 171 | start. */ |
| @@ -8766,9 +8768,17 @@ w32_read_socket (sd, bufp, numchars, expected) | |||
| 8766 | break; | 8768 | break; |
| 8767 | 8769 | ||
| 8768 | case WM_MOUSEMOVE: | 8770 | case WM_MOUSEMOVE: |
| 8771 | /* Ignore non-movement. */ | ||
| 8772 | { | ||
| 8773 | int x = LOWORD (msg.msg.lParam); | ||
| 8774 | int y = HIWORD (msg.msg.lParam); | ||
| 8775 | if (x == last_mousemove_x && y == last_mousemove_y) | ||
| 8776 | break; | ||
| 8777 | last_mousemove_x = x; | ||
| 8778 | last_mousemove_y = y; | ||
| 8779 | } | ||
| 8780 | |||
| 8769 | previous_help_echo = help_echo; | 8781 | previous_help_echo = help_echo; |
| 8770 | help_echo_object = help_echo_window = Qnil; | ||
| 8771 | help_echo_pos = -1; | ||
| 8772 | 8782 | ||
| 8773 | if (dpyinfo->grabbed && last_mouse_frame | 8783 | if (dpyinfo->grabbed && last_mouse_frame |
| 8774 | && FRAME_LIVE_P (last_mouse_frame)) | 8784 | && FRAME_LIVE_P (last_mouse_frame)) |
| @@ -8793,11 +8803,18 @@ w32_read_socket (sd, bufp, numchars, expected) | |||
| 8793 | 8803 | ||
| 8794 | /* If the contents of the global variable help_echo | 8804 | /* If the contents of the global variable help_echo |
| 8795 | has changed, generate a HELP_EVENT. */ | 8805 | has changed, generate a HELP_EVENT. */ |
| 8796 | if (help_echo != previous_help_echo) | 8806 | if (help_echo != previous_help_echo || |
| 8807 | (!NILP (help_echo) && !STRINGP (help_echo) && f->mouse_moved)) | ||
| 8797 | { | 8808 | { |
| 8798 | Lisp_Object frame; | 8809 | Lisp_Object frame; |
| 8799 | int n; | 8810 | int n; |
| 8800 | 8811 | ||
| 8812 | if (help_echo == Qnil) | ||
| 8813 | { | ||
| 8814 | help_echo_object = help_echo_window = Qnil; | ||
| 8815 | help_echo_pos = -1; | ||
| 8816 | } | ||
| 8817 | |||
| 8801 | if (f) | 8818 | if (f) |
| 8802 | XSETFRAME (frame, f); | 8819 | XSETFRAME (frame, f); |
| 8803 | else | 8820 | else |