Merge revision 635 changes:

- Win: Fix mouse wheel scrolling in second monitor (issue #595).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@636 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-05-18 21:58:38 +00:00
parent a63833acfd
commit c9be1aa8e4
1 changed files with 4 additions and 1 deletions

View File

@ -30,6 +30,9 @@
#include "ui/gfx/gdi_util.h" #include "ui/gfx/gdi_util.h"
#include "ui/gfx/rect.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::npapi::WebPluginGeometry;
using WebKit::WebInputEvent; using WebKit::WebInputEvent;
using WebKit::WebInputEventFactory; using WebKit::WebInputEventFactory;
@ -159,7 +162,7 @@ LRESULT CALLBACK WebWidgetHost::WndProc(HWND hwnd, UINT message, WPARAM wparam,
case WM_MOUSEWHEEL: case WM_MOUSEWHEEL:
{ {
// Only send mouse wheel events if the cursor is over the window. // 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; RECT wndRect;
GetWindowRect(hwnd, &wndRect); GetWindowRect(hwnd, &wndRect);
if (PtInRect(&wndRect, mousePt)) if (PtInRect(&wndRect, mousePt))