diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-08-17 18:04:34 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-08-18 08:07:27 +0000 |
commit | 95aad72e841b7d9bdef97a934c7fdfd65dc7122c (patch) | |
tree | 9261dcfa0278c6aa23c84970e67adda7688c2b5a /src | |
parent | 1fe890317a383e3729e496afff79a9ba58cc880a (diff) |
eglfs: Use libinput by default when available
Can be overridden by setting QT_QPA_EGLFS_NO_LIBINPUT.
On systems where libinput is present it is usually a better choice
to rely on it instead of evdev*.
Change-Id: I78857ff91c837f58fdc7d1e119260bd6819fbf4e
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsintegration.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp index aec5a5e179..5f2cc9abbc 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp @@ -40,6 +40,7 @@ #include <QtGui/QScreen> #include <QtGui/QOffscreenSurface> #include <QtGui/QWindow> +#include <QtCore/QLoggingCategory> #include <qpa/qwindowsysteminterface.h> #include <qpa/qplatforminputcontextfactory_p.h> @@ -62,6 +63,10 @@ #include <QtPlatformHeaders/QEGLNativeContext> +#ifndef QT_NO_LIBINPUT +#include <QtPlatformSupport/private/qlibinputhandler_p.h> +#endif + #if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK)) #include <QtPlatformSupport/private/qevdevmousemanager_p.h> #include <QtPlatformSupport/private/qevdevkeyboardmanager_p.h> @@ -389,6 +394,13 @@ void QEglFSIntegration::loadKeymapStatic(const QString &filename) void QEglFSIntegration::createInputHandlers() { +#ifndef QT_NO_LIBINPUT + if (!qEnvironmentVariableIntValue("QT_QPA_EGLFS_NO_LIBINPUT")) { + new QLibInputHandler(QLatin1String("libinput"), QString()); + return; + } +#endif + #if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK)) m_kbdMgr = new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString() /* spec */, this); new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString() /* spec */, this); |