summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/render_widget_host_view_qt.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 958ff91e1..728357e14 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -80,6 +80,7 @@
#include <QFocusEvent>
#include <QGuiApplication>
#include <QInputMethodEvent>
+#include <QLoggingCategory>
#include <QTextFormat>
#include <QKeyEvent>
#include <QMouseEvent>
@@ -1346,11 +1347,20 @@ void RenderWidgetHostViewQt::handleGestureEvent(QNativeGestureEvent *ev)
}
}
+Q_DECLARE_LOGGING_CATEGORY(QWEBENGINE_TOUCH_HANDLING);
+Q_LOGGING_CATEGORY(QWEBENGINE_TOUCH_HANDLING, "qt.webengine.touch");
+
void RenderWidgetHostViewQt::handleTouchEvent(QTouchEvent *ev)
{
// On macOS instead of handling touch events, we use the OS provided QNativeGestureEvents.
#ifdef Q_OS_MACOS
- return;
+ if (ev->spontaneous()) {
+ return;
+ } else {
+ qCWarning(QWEBENGINE_TOUCH_HANDLING)
+ << "Sending simulated touch events to Chromium does not work properly on macOS. "
+ "Consider using QNativeGestureEvents or QMouseEvents.";
+ }
#endif
// Chromium expects the touch event timestamps to be comparable to base::TimeTicks::Now().