From 929cd402732d2b15ab119ee675a22385c20ffef0 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 18 May 2012 21:58:07 +0000 Subject: [PATCH] Win: Fix mouse wheel scrolling in second monitor (issue #595). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@635 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef1/libcef/webwidget_host_win.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cef1/libcef/webwidget_host_win.cc b/cef1/libcef/webwidget_host_win.cc index 37658f5d0..a8ec09157 100644 --- a/cef1/libcef/webwidget_host_win.cc +++ b/cef1/libcef/webwidget_host_win.cc @@ -30,6 +30,9 @@ #include "ui/gfx/gdi_util.h" #include "ui/gfx/rect.h" +#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) +#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) + using webkit::npapi::WebPluginGeometry; using WebKit::WebInputEvent; using WebKit::WebInputEventFactory; @@ -159,7 +162,7 @@ LRESULT CALLBACK WebWidgetHost::WndProc(HWND hwnd, UINT message, WPARAM wparam, case WM_MOUSEWHEEL: { // Only send mouse wheel events if the cursor is over the window. - POINT mousePt = { LOWORD(lparam), HIWORD(lparam) }; + POINT mousePt = { GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam) }; RECT wndRect; GetWindowRect(hwnd, &wndRect); if (PtInRect(&wndRect, mousePt))