From 4f539b2671988f73107db4391faa7a6ad539009b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20R=C3=B8dal?= Date: Wed, 30 May 2012 08:10:08 +0200 Subject: [PATCH] KMS platform plugin: Introduce default cursor for better usability. 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 --- src/plugins/platforms/kms/qkmsscreen.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/platforms/kms/qkmsscreen.cpp b/src/plugins/platforms/kms/qkmsscreen.cpp index 790c231..f9b12d7 100644 --- a/src/plugins/platforms/kms/qkmsscreen.cpp +++ b/src/plugins/platforms/kms/qkmsscreen.cpp @@ -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, -- 2.7.4