diff src/w32fns.c @ 24751:e0eaca5025bc

(w32_wnd_proc): Ensure mouse capture is released if frame loses focus, and that mouse button state is reset. Ditto when the menu bar is activated.
author Andrew Innes <andrewi@gnu.org>
date Thu, 20 May 1999 20:42:58 +0000
parents 547f54dfbb94
children 07a04c532706
line wrap: on
line diff
--- a/src/w32fns.c	Wed May 19 21:30:58 1999 +0000
+++ b/src/w32fns.c	Thu May 20 20:42:58 1999 +0000
@@ -4237,6 +4237,8 @@
       goto dflt;
 
     case WM_INITMENU:
+      button_state = 0;
+      ReleaseCapture ();
       /* We must ensure menu bar is fully constructed and up to date
 	 before allowing user interaction with it.  To achieve this
 	 we send this message to the lisp thread and wait for a
@@ -4382,6 +4384,8 @@
       goto command;
     case WM_KILLFOCUS:
       unregister_hot_keys (hwnd);
+      button_state = 0;
+      ReleaseCapture ();
     case WM_MOVE:
     case WM_SIZE:
     case WM_COMMAND: