summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2013-12-29 19:53:24 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-30 15:23:43 +0100
commite8d31d1b315c40ef0906579b429bc04279a1686d (patch)
treed3ee549ead699d6e2304edbc76cc55264fcf0f2b /src/plugins
parent0336202749257d48b5356b92a724e0451e2c16c7 (diff)
linuxfb: Make mouse cursor behavior match eglfs
On non-Android systems hideCursor should default to false, just like it is done in eglfs. This is especially useful on udev-less systems where currently one has to resort to setting QT_QPA_FB_HIDECURSOR to "0" to enable the mouse cursor. This is not ideal. Defaulting to showing the cursor unless disabled by the environment variable or, in absence of that, the lack of a mouse reported by udev is a better choice. Change-Id: I7362ac47046179d5eb8ed8b44cf2c36c0fc23432 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
index 4f9284da7f..735a43daf7 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
@@ -400,7 +400,11 @@ bool QLinuxFbScreen::initialize()
mFbScreenImage = QImage(mMmap.data, geometry.width(), geometry.height(), mBytesPerLine, mFormat);
QByteArray hideCursorVal = qgetenv("QT_QPA_FB_HIDECURSOR");
+#if !defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK)
+ bool hideCursor = false;
+#else
bool hideCursor = true; // default to true to prevent the cursor showing up with the subclass on Android
+#endif
if (hideCursorVal.isEmpty()) {
#if !defined(QT_NO_EVDEV) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
QScopedPointer<QDeviceDiscovery> dis(QDeviceDiscovery::create(QDeviceDiscovery::Device_Mouse));