summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2017-02-22 16:33:45 +0100
committerMichael BrĂ¼ning <michael.bruning@qt.io>2017-02-22 16:19:53 +0000
commitb70bdb111e16d9437f60725f8c2854014a569289 (patch)
tree7f61dffb37ca3a748b57dac095fd6bda0fc2f98c /src/webengine
parent91b1ceb4838e9b9140a966a1e161ab3b649a36bc (diff)
Ignore synthetic hover move events if the mouse has not actually moved
6f84a09dfb and b2501b0bda in qtdeclarative introduced a synthetic hover move event being sent once per frame if the item underneath the mouse is marked as dirty. This triggers a loop when the web contents changes reacting to mouse move events as the item needs to be marked dirty to be rerendered. Ignore hover move events if the position of the mouse has actually not changed to work around this. Task-number: QTBUG-58561 Change-Id: Ic7f3c06e7acf5dfeacc95e347bd026233c957556 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index f79b0ca22..4e4fc406f 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -323,7 +323,8 @@ void RenderWidgetHostViewQtDelegateQuick::touchEvent(QTouchEvent *event)
void RenderWidgetHostViewQtDelegateQuick::hoverMoveEvent(QHoverEvent *event)
{
QQuickItem *parent = parentItem();
- if (!m_isPopup && parent && !parent->property("activeFocusOnPress").toBool() && !parent->hasActiveFocus()) {
+ if ((!m_isPopup && parent && !parent->property("activeFocusOnPress").toBool()
+ && !parent->hasActiveFocus()) || event->posF() == event->oldPosF()) {
event->ignore();
return;
}