summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2014-02-21 01:21:17 +1100
committerwm4 <wm4@nowhere>2014-03-30 17:42:02 +0200
commit421b2be348ff4b5f0d2ff25ab413fda14f818e6c (patch)
treeab3458d82ff0769e1ab5915d9e9a0c9a59720144
parentb659476ed9ffb4e0d3bd888614133aa30faefd71 (diff)
downloadmpv-421b2be348ff4b5f0d2ff25ab413fda14f818e6c.tar.bz2
mpv-421b2be348ff4b5f0d2ff25ab413fda14f818e6c.tar.xz
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.
-rw-r--r--video/out/w32_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 89ddc823fb..518c8343e6 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -333,6 +333,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);