]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32_read_socket) <WM_MOUSELEAVE>: Cancel help echo
authorJason Rumney <jasonr@gnu.org>
Sat, 1 Dec 2001 11:09:33 +0000 (11:09 +0000)
committerJason Rumney <jasonr@gnu.org>
Sat, 1 Dec 2001 11:09:33 +0000 (11:09 +0000)
and mouse face.

src/w32term.c

index af09b7b85549fe7e263d956446e4b3beb2ae04b2..19e51266dac65e9c894656e2119fc5cdc90eed83 100644 (file)
@@ -8916,6 +8916,36 @@ w32_read_socket (sd, bufp, numchars, expected)
          check_visibility = 1;
          break;
 
+       case WM_MOUSELEAVE:
+         f = x_any_window_to_frame (dpyinfo, msg.msg.hwnd);
+         if (f)
+           {
+             if (f == dpyinfo->mouse_face_mouse_frame)
+               {
+                 /* 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;
+               }
+
+             /* Generate a nil HELP_EVENT to cancel a help-echo.
+                Do it only if there's something to cancel.
+                Otherwise, the startup message is cleared when
+                the mouse leaves the frame.  */
+             if (any_help_event_p)
+               {
+                 Lisp_Object frame;
+                 int n;
+
+                 XSETFRAME (frame, f);
+                 help_echo = Qnil;
+                 n = gen_help_event (bufp, numchars,
+                                     Qnil, frame, Qnil, Qnil, 0);
+                 bufp += n, count += n, numchars -= n;
+               }
+           }
+         break;
+             
        case WM_SETFOCUS:
          f = x_any_window_to_frame (dpyinfo, msg.msg.hwnd);