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>
This commit is contained in:
parent
0336202749
commit
e8d31d1b31
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user