diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-10-13 16:01:06 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-10-17 08:08:47 +0200 |
commit | 47870f02f7acc614eb622816193eb70750b15396 (patch) | |
tree | 5eaa54b39db76fe0cc83a4d4157f49b706cbfb42 /src/platformsupport/eglconvenience/qeglplatformintegration.cpp | |
parent | 573f5a8ed51b5d7df48e86ed8730fdd5721e0242 (diff) |
Simplify using tslib with eglfs
tslib support can now be built-in into eglfs, like evdev.
Set QT_QPA_EGLFS_TSLIB to 1 to use tslib instead of evdevtouch.
The input device can be controlled via TSLIB_TSDEVICE.
Change-Id: Iff6bdbb4d133f73eca5528705844862236f8752b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformintegration.cpp')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformintegration.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp index a9f0c0f448..fea2ae2369 100644 --- a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp @@ -50,6 +50,10 @@ #include <QtPlatformSupport/private/qevdevtouch_p.h> #endif +#if !defined(QT_NO_TSLIB) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK)) +#include <QtPlatformSupport/private/qtslib_p.h> +#endif + #include <QtPlatformHeaders/qeglfsfunctions.h> #include "qeglplatformintegration_p.h" @@ -351,7 +355,13 @@ void QEGLPlatformIntegration::createInputHandlers() if (cursor) cursor->setMouseDeviceDiscovery(mouseMgr->deviceDiscovery()); } - new QEvdevTouchScreenHandlerThread(QString() /* spec */, this); +#ifndef QT_NO_TSLIB + const bool useTslib = qEnvironmentVariableIntValue("QT_QPA_EGLFS_TSLIB"); + if (useTslib) + new QTsLibMouseHandler(QLatin1String("TsLib"), QString() /* spec */); + else +#endif // QT_NO_TSLIB + new QEvdevTouchScreenHandlerThread(QString() /* spec */, this); #endif } |