From 2109d767633d55cdf57dc2db35b38cac7312dc39 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 27 Oct 2014 21:58:37 +0000 Subject: [PATCH] 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 --- tests/cefclient/cefclient_osr_widget_win.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/cefclient/cefclient_osr_widget_win.cpp b/tests/cefclient/cefclient_osr_widget_win.cpp index 49a5405e4..b884900b0 100644 --- a/tests/cefclient/cefclient_osr_widget_win.cpp +++ b/tests/cefclient/cefclient_osr_widget_win.cpp @@ -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); }