mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 09:59:44 +00:00
w32_common: capture mouse input
Mouse buttons can get stuck down if the button is pressed inside the video window and released outside. Avoid this by capturing mouse input when a button is pressed.
This commit is contained in:
parent
b05803c2e1
commit
6402b9dc38
@ -465,6 +465,11 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (mouse_button & MP_KEY_STATE_DOWN)
|
||||
SetCapture(w32->window);
|
||||
else
|
||||
ReleaseCapture();
|
||||
}
|
||||
|
||||
return DefWindowProcW(hWnd, message, wParam, lParam);
|
||||
|
Loading…
Reference in New Issue
Block a user