From df80753134b714defe956ba87bc5077e32b1d63b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 17 Aug 2015 18:27:35 +0200 Subject: linuxfb: Use libinput by default when available Can be overridden by setting QT_QPA_FB_NO_LIBINPUT. On systems where libinput is present it is usually a better choice to rely on it instead of evdev*. Change-Id: I8532c923bacd605434cfca1c7e314cb95d41b372 Reviewed-by: Andy Nichols --- src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp index ccf86dafb2..8c8c8a15ea 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp @@ -46,6 +46,10 @@ #include #include +#ifndef QT_NO_LIBINPUT +#include +#endif + #if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK)) #include #include @@ -130,6 +134,13 @@ QPlatformServices *QLinuxFbIntegration::services() const void QLinuxFbIntegration::createInputHandlers() { +#ifndef QT_NO_LIBINPUT + if (!qEnvironmentVariableIntValue("QT_QPA_FB_NO_LIBINPUT")) { + new QLibInputHandler(QLatin1String("libinput"), QString()); + return; + } +#endif + #if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK)) new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString(), this); new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString(), this); -- cgit v1.2.3