summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-08-01 20:13:42 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-08-01 20:13:42 +0000
commit4cd760385df3663db0b57886f91f37ab57e894be (patch)
treee314456740e727f6c70963a9c20737140ec30383 /libvo
parent9db0e66a3bdc8afb5bc762b87495c395f743d5a7 (diff)
downloadmpv-4cd760385df3663db0b57886f91f37ab57e894be.tar.bz2
mpv-4cd760385df3663db0b57886f91f37ab57e894be.tar.xz
support for passing mouse events on to MPlayer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12928 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/w32_common.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index e1987927ca..69411ee056 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -58,12 +58,33 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
mplayer_put_key(wParam);
break;
case WM_LBUTTONDOWN:
+ if (!vo_nomouse_input && (vo_fs || (wParam & MK_CONTROL))) {
+ mplayer_put_key(MOUSE_BTN0);
+ break;
+ }
if (!vo_fs) {
ReleaseCapture();
SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0);
return 0;
}
break;
+ case WM_MBUTTONDOWN:
+ if (!vo_nomouse_input)
+ mplayer_put_key(MOUSE_BTN1);
+ break;
+ case WM_RBUTTONDOWN:
+ if (!vo_nomouse_input)
+ mplayer_put_key(MOUSE_BTN2);
+ break;
+ case WM_MOUSEWHEEL:
+ if (!vo_nomouse_input) {
+ int x = GET_WHEEL_DELTA_WPARAM(wParam);
+ if (x > 0)
+ mplayer_put_key(MOUSE_BTN3);
+ else
+ mplayer_put_key(MOUSE_BTN4);
+ break;
+ }
}
return DefWindowProc(hWnd, message, wParam, lParam);