From 71b5f56302bbd8be62f63f0dd62cbcd33aab3ac5 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Thu, 21 Feb 2013 17:12:17 +0000 Subject: hw/xwin: Handle WM_MOUSEHWHEEL Handle WM_MOUSEHWHEEL tilt wheel messages, similarly to WM_MOUSEWHEEL scroll wheel messages, to generate X button 6 and 7 presses and releases. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winmultiwindowwndproc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'hw/xwin/winmultiwindowwndproc.c') diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index da7914ab7..9292e73ca 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -684,6 +684,18 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) else break; + case WM_MOUSEHWHEEL: + if (SendMessage + (hwnd, WM_NCHITTEST, 0, + MAKELONG(GET_X_LPARAM(lParam), + GET_Y_LPARAM(lParam))) == HTCLIENT) { + /* Pass the message to the root window */ + SendMessage(hwndScreen, message, wParam, lParam); + return 0; + } + else + break; + case WM_SETFOCUS: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; -- cgit v1.2.3