]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32_wnd_proc) <WM_MOUSEMOVE>: Ignore mouse movements if a menu is active
authorEli Zaretskii <eliz@gnu.org>
Sat, 8 Apr 2006 20:05:43 +0000 (20:05 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 8 Apr 2006 20:05:43 +0000 (20:05 +0000)
on this frame.

src/ChangeLog
src/w32fns.c

index 85acd1c19c11ffd6872f392649dbb5746f870008..e91028e54e2eaafe841370c968152079c0d1a62a 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-08  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Ignore mouse movements
+       if a menu is active on this frame.
+
 2006-04-08  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * lisp.h (report_file_error): Mark as NO_RETURN.
index 1cc3dc2800c228e7ad48d16c1b976c646cee9781..093739d1603d1509212e74666f68288fcde6adb9 100644 (file)
@@ -3297,6 +3297,14 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
       return (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONUP);
 
     case WM_MOUSEMOVE:
+      /* Ignore mouse movements as long as the menu is active.  These
+        movements are processed by the window manager anyway, and
+        it's wrong to handle them as if they happened on the
+        underlying frame.  */
+      f = x_window_to_frame (dpyinfo, hwnd);
+      if (f && f->output_data.w32->menubar_active)
+       return 0;
+
       /* If the mouse has just moved into the frame, start tracking
         it, so we will be notified when it leaves the frame.  Mouse
         tracking only works under W98 and NT4 and later. On earlier