]> code.delx.au - gnu-emacs/commitdiff
Support help-echo and tooltip messages on w32 text-mode terminals.
authorEli Zaretskii <eliz@gnu.org>
Sat, 26 May 2012 11:58:19 +0000 (14:58 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 26 May 2012 11:58:19 +0000 (14:58 +0300)
 src/w32inevt.c (do_mouse_event): If help_echo changed, call gen_help_event
 to produce help-echo message in the echo area.

src/ChangeLog
src/w32inevt.c

index 934d7f5f780db68a3f8c714a752501bd02e70acb..aeab5c9d1137a8badb9db656da62e2f6d6435a3a 100644 (file)
@@ -1,6 +1,8 @@
 2012-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * w32inevt.c (do_mouse_event): Support mouse-autoselect-window.
+       If help_echo changed, call gen_help_event to produce help-echo
+       message in the echo area.
 
 2012-05-26  Eli Zaretskii  <eliz@gnu.org>
 
index 5f6856413e82b799ac1cca4a8832f97336413882..a85fdbbe43570e7e5821b6051f752fd9f23f266c 100644 (file)
@@ -621,8 +621,6 @@ do_mouse_event (MOUSE_EVENT_RECORD *event,
              clear_mouse_face (hlinfo);
            }
 
-         note_mouse_highlight (f, mx, my);
-
          /* Generate SELECT_WINDOW_EVENTs when needed.  */
          if (!NILP (Vmouse_autoselect_window))
            {
@@ -649,6 +647,16 @@ do_mouse_event (MOUSE_EVENT_RECORD *event,
            }
          else
            last_mouse_window = Qnil;
+
+         previous_help_echo_string = help_echo_string;
+         help_echo_string = help_echo_object = help_echo_window = Qnil;
+         help_echo_pos = -1;
+         note_mouse_highlight (f, mx, my);
+         /* If the contents of the global variable help_echo has
+            changed (inside note_mouse_highlight), generate a HELP_EVENT.  */
+         if (!NILP (help_echo_string) || !NILP (previous_help_echo_string))
+           gen_help_event (help_echo_string, selected_frame, help_echo_window,
+                           help_echo_object, help_echo_pos);
        }
       return 0;
     }