From 7bd670949cb06dc88ddd98ed6ca3fe25f4df14c8 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Fri, 21 Feb 2014 01:23:52 +1100 Subject: 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. --- video/out/w32_common.c | 2 ++ 1 file changed, 2 insertions(+) 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; } } -- cgit v1.2.3