From 4cd760385df3663db0b57886f91f37ab57e894be Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 1 Aug 2004 20:13:42 +0000 Subject: support for passing mouse events on to MPlayer git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12928 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/w32_common.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'libvo') 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); -- cgit v1.2.3