Windows: Fix reporting of WM_MOUSELEAVE coordinates by the cefclient OSR example (issue #1133).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1890 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2014-10-27 21:58:37 +00:00
parent a0f5f9c6c8
commit 2109d76763
1 changed files with 7 additions and 2 deletions

View File

@ -647,9 +647,14 @@ LRESULT CALLBACK OSRWindow::WndProc(HWND hWnd, UINT message,
mouseTracking = false;
}
if (browser.get()) {
// Determine the cursor position in screen coordinates.
POINT p;
::GetCursorPos(&p);
::ScreenToClient(hWnd, &p);
CefMouseEvent mouse_event;
mouse_event.x = 0;
mouse_event.y = 0;
mouse_event.x = p.x;
mouse_event.y = p.y;
mouse_event.modifiers = GetCefMouseModifiers(wParam);
browser->SendMouseMoveEvent(mouse_event, true);
}