diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-05-15 14:19:02 +0300 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-05-21 05:16:33 +0000 |
commit | 2858a3c91b745357c1fa99b49b24705a155c6609 (patch) | |
tree | d75aedfd1d25c8b4aef2754c3b62a32c6b306c73 /src/widgets | |
parent | fc78456fba8d568e8852032f66b6ede14973ffea (diff) |
Don't propagate single touch events only from touchpads on OS X
This way the tests that send fake touchscreen events can work.
Change-Id: I997ef015d0096249c4549dbd21b99d0248e0c987
Task-number: QTBUG-46111
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index d61277f990..d61737efc9 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -4358,8 +4358,10 @@ bool QApplicationPrivate::translateRawTouchEvent(QWidget *window, #ifdef Q_OS_OSX // Single-touch events are normally not sent unless WA_TouchPadAcceptSingleTouchEvents is set. - // In Qt 4 this check was in OS X-only coode. That behavior is preserved here by the #ifdef. - if (touchPoints.count() == 1 && !targetWidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents)) + // In Qt 4 this check was in OS X-only code. That behavior is preserved here by the #ifdef. + if (touchPoints.count() == 1 + && device->type() == QTouchDevice::TouchPad + && !targetWidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents)) continue; #endif |