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:
parent
a63833acfd
commit
c9be1aa8e4
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue