From c5decb0718eabcefadc5eec09e6da963a74bf03c Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 10 Feb 2008 10:01:25 +0000 Subject: Forward mouse messages to -wid Window. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25972 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/w32_common.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'libvo') diff --git a/libvo/w32_common.c b/libvo/w32_common.c index dfcbe7f0dd..045f779037 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -43,6 +43,7 @@ static BOOL (WINAPI* myEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARA static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { RECT r; POINT p; + if (WinID < 0 || message == WM_PAINT || message == WM_SIZE) { switch (message) { case WM_PAINT: event_flags |= VO_EVENT_EXPOSE; @@ -143,6 +144,19 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l break; } } + } else switch (message) { + case WM_MOUSEMOVE: + case WM_LBUTTONDOWN: + case WM_LBUTTONUP: + case WM_LBUTTONDBLCLK: + case WM_MBUTTONDOWN: + case WM_MBUTTONUP: + case WM_MBUTTONDBLCLK: + case WM_RBUTTONDOWN: + case WM_RBUTTONUP: + case WM_RBUTTONDBLCLK: + SendMessage(WinID, message, wParam, lParam); + } return DefWindowProc(hWnd, message, wParam, lParam); } @@ -361,7 +375,7 @@ int vo_w32_init(void) { mplayerIcon = LoadIcon(0, IDI_APPLICATION); { - WNDCLASSEX wcex = { sizeof wcex, CS_OWNDC, WndProc, 0, 0, hInstance, mplayerIcon, LoadCursor(0, IDC_ARROW), (HBRUSH)GetStockObject(BLACK_BRUSH), 0, classname, mplayerIcon }; + WNDCLASSEX wcex = { sizeof wcex, CS_OWNDC | CS_DBLCLKS, WndProc, 0, 0, hInstance, mplayerIcon, LoadCursor(0, IDC_ARROW), (HBRUSH)GetStockObject(BLACK_BRUSH), 0, classname, mplayerIcon }; if (!RegisterClassEx(&wcex)) { mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to register window class!\n"); -- cgit v1.2.3