- Add new call to OnKeyEvent() to allow handling of keyboard events before they're passed to the renderer (issue #406).

- Windows: only scroll with middle mouse button when the cursor is over the view (issue #410).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@356 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-11-04 18:19:14 +00:00
parent 6d8e46fb63
commit 058e9ef2f2
17 changed files with 166 additions and 84 deletions

View File

@@ -156,7 +156,14 @@ LRESULT CALLBACK WebWidgetHost::WndProc(HWND hwnd, UINT message, WPARAM wparam,
break;
case WM_MOUSEWHEEL:
host->WheelEvent(wparam, lparam);
{
// Only send mouse wheel events if the cursor is over the window.
POINT mousePt = { LOWORD(lparam), HIWORD(lparam) };
RECT wndRect;
GetWindowRect(hwnd, &wndRect);
if (PtInRect(&wndRect, mousePt))
host->WheelEvent(wparam, lparam);
}
break;
case WM_MOUSEACTIVATE: