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>bb10
parent
573f5a8ed5
commit
47870f02f7
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,8 +48,10 @@ QT_BEGIN_NAMESPACE
|
|||
Q_LOGGING_CATEGORY(qLcTsLib, "qt.qpa.input")
|
||||
|
||||
QTsLibMouseHandler::QTsLibMouseHandler(const QString &key,
|
||||
const QString &specification)
|
||||
: m_notify(0), m_x(0), m_y(0), m_pressed(0), m_rawMode(false)
|
||||
const QString &specification,
|
||||
QObject *parent)
|
||||
: QObject(parent),
|
||||
m_notify(0), m_x(0), m_y(0), m_pressed(0), m_rawMode(false)
|
||||
{
|
||||
qCDebug(qLcTsLib) << "Initializing tslib plugin" << key << specification;
|
||||
setObjectName(QLatin1String("TSLib Mouse Handler"));
|
||||
|
|
|
|||
|
|
@ -45,8 +45,9 @@ class QSocketNotifier;
|
|||
class QTsLibMouseHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QTsLibMouseHandler(const QString &key, const QString &specification);
|
||||
QTsLibMouseHandler(const QString &key, const QString &specification, QObject *parent = 0);
|
||||
~QTsLibMouseHandler();
|
||||
|
||||
private slots:
|
||||
|
|
|
|||
Loading…
Reference in New Issue