summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Tinkl <ltinkl@luxoft.com>2017-10-10 18:56:52 +0200
committerLukáš Tinkl <ltinkl@luxoft.com>2017-10-11 10:27:41 +0000
commit10b8ed38e6cd6c9d9014fe770b753a4626491794 (patch)
treeeff2d7eeb4525dcd19849c01ee22131a2534e49f
parent6ce4e158152bbb94c71ac7c70e2bf02d81d1894a (diff)
downloadneptune-ui-10b8ed38e6cd6c9d9014fe770b753a4626491794.tar.gz
fix touch events with a real touchscreen
don't bother creating a fake touch device when there's a real one present Change-Id: I73aaab585b21d16ab02993435391877c8acbd35e Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com> Reviewed-by: Daniel d'Andrada <daniel.dandrada@luxoft.com>
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index e1be1b2..5f1ad6b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -71,7 +71,10 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
fileList.append(QStringLiteral("am-config.yaml"));
#ifdef NEPTUNE_ENABLE_TOUCH_EMULATION
- auto *mouseTouchAdaptor = MouseTouchAdaptor::instance();
+ MouseTouchAdaptor *mouseTouchAdaptor = nullptr;
+ if (QTouchDevice::devices().isEmpty()) {
+ mouseTouchAdaptor = MouseTouchAdaptor::instance();
+ }
#endif
DefaultConfiguration cfg(fileList, "");