changeset 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 ea9b449cc742
children 80c46fd667da
files src/w32fns.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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: