diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2014-02-21 01:23:52 +1100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-12 14:51:25 +0100 |
commit | 3bcb4b8a9e19cc0644c8a0cf0c4e1bdab907daf7 (patch) | |
tree | 8ad245404536a2f071b719a5bb19f123644d1705 | |
parent | 6402b9dc38729d76a5e4dbb81efd26ab136bc1c1 (diff) | |
download | mpv-3bcb4b8a9e19cc0644c8a0cf0c4e1bdab907daf7.tar.bz2 mpv-3bcb4b8a9e19cc0644c8a0cf0c4e1bdab907daf7.tar.xz |
w32_common: prevent MOUSE_BTN0 sticking after drag
The window doesn't recieve a WM_LBUTTONUP message after it's dragged,
probably because it's swallowed by the modal loop. To stop the button
from sticking, release it manually when the drag is complete.
-rw-r--r-- | video/out/w32_common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index d93592d61e..3181b424cb 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -462,6 +462,8 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, // Window dragging hack ReleaseCapture(); SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); + mp_input_put_key(vo->input_ctx, MP_MOUSE_BTN0 | + MP_KEY_STATE_UP); return 0; } } |