summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2014-02-21 01:23:52 +1100
committerwm4 <wm4@nowhere>2014-03-12 14:51:25 +0100
commit3bcb4b8a9e19cc0644c8a0cf0c4e1bdab907daf7 (patch)
tree8ad245404536a2f071b719a5bb19f123644d1705 /video
parent6402b9dc38729d76a5e4dbb81efd26ab136bc1c1 (diff)
downloadmpv-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.
Diffstat (limited to 'video')
-rw-r--r--video/out/w32_common.c2
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;
}
}