KMS platform plugin: Introduce default cursor for better usability.
authorSamuel Rødal <samuel.rodal@nokia.com>
Wed, 30 May 2012 06:10:08 +0000 (08:10 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 30 May 2012 09:11:02 +0000 (11:11 +0200)
Similar to the default cursor in eglfs, not having it makes it hard to
interact with Qt applications using the evdevmouse plugin.

Change-Id: I9638267c7d790d91b66620e4a82d86f299061922
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
src/plugins/platforms/kms/qkmsscreen.cpp

index 790c231..f9b12d7 100644 (file)
@@ -211,6 +211,14 @@ void QKmsScreen::performPageFlip()
         if (ret)
             qFatal("failed to set mode");
         m_modeSet = true;
+
+        // Initialize cursor
+
+        static int hideCursor = qgetenv("QT_QPA_KMS_HIDECURSOR").toInt();
+        if (!hideCursor) {
+            QCursor cursor(Qt::ArrowCursor);
+            m_cursor->changeCursor(&cursor, 0);
+        }
     }
 
     int pageFlipStatus = drmModePageFlip(m_device->fd(), m_crtcId,