From a038352dc05a880eec6b94b5ba4e01673b1565ca Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 15 Nov 2013 17:08:26 +0100 Subject: Do not accept all touch events QtWebKit currently accepts all touch events to prevent the lack of accept on a TouchBegin from preventing receiving TouchUpdate and TouchEnd. This behavior prevents QGuiApplication from converting touch events to mouse events, and makes the WebView widget impossible to interact with by touch. This patch modifies the behavior slighly so that QtWebKit only accepts touch events if they are needed for the active document. Task-number: QTBUG-31938 Change-Id: Iba80ebfaf31c93f82356e3f0622039120921172a Reviewed-by: Jocelyn Turcotte --- Source/WebKit/qt/WidgetApi/qwebview.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Source/WebKit/qt/WidgetApi/qwebview.cpp') diff --git a/Source/WebKit/qt/WidgetApi/qwebview.cpp b/Source/WebKit/qt/WidgetApi/qwebview.cpp index 9ba962178..bcbf3dcc2 100644 --- a/Source/WebKit/qt/WidgetApi/qwebview.cpp +++ b/Source/WebKit/qt/WidgetApi/qwebview.cpp @@ -722,10 +722,8 @@ bool QWebView::event(QEvent *e) || e->type() == QEvent::TouchEnd || e->type() == QEvent::TouchUpdate || e->type() == QEvent::TouchCancel) { - d->page->event(e); - - // Always return true so that we'll receive also TouchUpdate and TouchEnd events - return true; + if (d->page->event(e)) + return true; } else if (e->type() == QEvent::Leave) d->page->event(e); } -- cgit v1.2.1