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-30 17:42:07 +0200
commit7bd670949cb06dc88ddd98ed6ca3fe25f4df14c8 (patch)
treec1082a72c9c3776ef8c34445bbb3c1c63799e0ba /video
parent421b2be348ff4b5f0d2ff25ab413fda14f818e6c (diff)
downloadmpv-7bd670949cb06dc88ddd98ed6ca3fe25f4df14c8.tar.bz2
mpv-7bd670949cb06dc88ddd98ed6ca3fe25f4df14c8.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 518c8343e6..86801fcc5e 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -330,6 +330,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;
}
}