]> git.eshelyaron.com Git - emacs.git/commitdiff
(w32_wnd_proc): Ensure mouse capture is released if
authorAndrew Innes <andrewi@gnu.org>
Thu, 20 May 1999 20:42:58 +0000 (20:42 +0000)
committerAndrew Innes <andrewi@gnu.org>
Thu, 20 May 1999 20:42:58 +0000 (20:42 +0000)
frame loses focus, and that mouse button state is reset.  Ditto
when the menu bar is activated.

src/w32fns.c

index b54e56e3c56640e350bf70cc4f0251418dae2ae4..201fbb3fc76e793cfa876fed33f7d7e739eaf269 100644 (file)
@@ -4237,6 +4237,8 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
       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 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
       goto command;
     case WM_KILLFOCUS:
       unregister_hot_keys (hwnd);
+      button_state = 0;
+      ReleaseCapture ();
     case WM_MOVE:
     case WM_SIZE:
     case WM_COMMAND: