summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/render_widget_host_view_qt.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index cc0510666..5183f6732 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -878,6 +878,13 @@ bool RenderWidgetHostViewQt::IsPopup() const
void RenderWidgetHostViewQt::handleMouseEvent(QMouseEvent* event)
{
+ // Don't forward mouse events synthesized by the system, which are caused by genuine touch
+ // events. Chromium would then process for e.g. a mouse click handler twice, once due to the
+ // system synthesized mouse event, and another time due to a touch-to-gesture-to-mouse
+ // transformation done by Chromium.
+ if (event->source() == Qt::MouseEventSynthesizedBySystem)
+ return;
+
blink::WebMouseEvent webEvent = WebEventFactory::toWebMouseEvent(event, dpiScale());
if (event->type() == QMouseEvent::MouseButtonPress) {
if (event->button() != m_clickHelper.lastPressButton