From 074555b6ead1a6c07f6a44acded748d562811fe6 Mon Sep 17 00:00:00 2001 From: nowrep Date: Tue, 8 May 2012 14:28:54 +0200 Subject: [PATCH] Little modification in LeaveEvent processing in WebPage. - it is now sending fake mouse move event with correct x value according to cursor position --- src/lib/webview/webpage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/webview/webpage.cpp b/src/lib/webview/webpage.cpp index 20729e85f..5f860a471 100644 --- a/src/lib/webview/webpage.cpp +++ b/src/lib/webview/webpage.cpp @@ -370,7 +370,9 @@ bool WebPage::event(QEvent* event) // So we are faking mouse move event with proper coordinates for // so called "just outside of the widget" position - QMouseEvent fakeEvent(QEvent::MouseMove, QPoint(0, -1), Qt::NoButton, Qt::NoButton, Qt::NoModifier); + QPoint mousePos(view()->mapFromGlobal(QCursor::pos()).x(), -1); + QMouseEvent fakeEvent(QEvent::MouseMove, mousePos, Qt::NoButton, Qt::NoButton, Qt::NoModifier); + return QWebPage::event(&fakeEvent); }