diff options
| author | Andrew Innes | 1999-05-20 20:42:58 +0000 |
|---|---|---|
| committer | Andrew Innes | 1999-05-20 20:42:58 +0000 |
| commit | 487163ac866cc3b9ff364bb5b3cb5a10835ea78b (patch) | |
| tree | c4d16bfe8c2206828540a9516a4f0c2824b566fe | |
| parent | 69c6eff89b8b9526d2afe14b4256b8f8256f6c47 (diff) | |
| download | emacs-487163ac866cc3b9ff364bb5b3cb5a10835ea78b.tar.gz emacs-487163ac866cc3b9ff364bb5b3cb5a10835ea78b.zip | |
(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.
| -rw-r--r-- | src/w32fns.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index b54e56e3c56..201fbb3fc76 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4237,6 +4237,8 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 4237 | goto dflt; | 4237 | goto dflt; |
| 4238 | 4238 | ||
| 4239 | case WM_INITMENU: | 4239 | case WM_INITMENU: |
| 4240 | button_state = 0; | ||
| 4241 | ReleaseCapture (); | ||
| 4240 | /* We must ensure menu bar is fully constructed and up to date | 4242 | /* We must ensure menu bar is fully constructed and up to date |
| 4241 | before allowing user interaction with it. To achieve this | 4243 | before allowing user interaction with it. To achieve this |
| 4242 | we send this message to the lisp thread and wait for a | 4244 | we send this message to the lisp thread and wait for a |
| @@ -4382,6 +4384,8 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 4382 | goto command; | 4384 | goto command; |
| 4383 | case WM_KILLFOCUS: | 4385 | case WM_KILLFOCUS: |
| 4384 | unregister_hot_keys (hwnd); | 4386 | unregister_hot_keys (hwnd); |
| 4387 | button_state = 0; | ||
| 4388 | ReleaseCapture (); | ||
| 4385 | case WM_MOVE: | 4389 | case WM_MOVE: |
| 4386 | case WM_SIZE: | 4390 | case WM_SIZE: |
| 4387 | case WM_COMMAND: | 4391 | case WM_COMMAND: |