diff options
author | Lukáš Tinkl <ltinkl@luxoft.com> | 2017-10-10 18:56:52 +0200 |
---|---|---|
committer | Lukáš Tinkl <ltinkl@luxoft.com> | 2017-10-11 10:27:41 +0000 |
commit | 10b8ed38e6cd6c9d9014fe770b753a4626491794 (patch) | |
tree | eff2d7eeb4525dcd19849c01ee22131a2534e49f | |
parent | 6ce4e158152bbb94c71ac7c70e2bf02d81d1894a (diff) | |
download | neptune-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.cpp | 5 |
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, ""); |