diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2017-02-22 16:33:45 +0100 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@qt.io> | 2017-02-22 16:19:53 +0000 |
commit | b70bdb111e16d9437f60725f8c2854014a569289 (patch) | |
tree | 7f61dffb37ca3a748b57dac095fd6bda0fc2f98c /src/webengine/render_widget_host_view_qt_delegate_quick.cpp | |
parent | 91b1ceb4838e9b9140a966a1e161ab3b649a36bc (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/render_widget_host_view_qt_delegate_quick.cpp')
-rw-r--r-- | src/webengine/render_widget_host_view_qt_delegate_quick.cpp | 3 |
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; } |