eglfs QPA: Hide the cursor when QT_QPA_EGLFS_HIDECURSOR is set

Change-Id: Ib5491c26db2a29e8905573198741df75d8511ace
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
Andy Shaw 2016-04-01 18:44:18 +02:00
parent f44d826751
commit a5456b23f4

View File

@ -64,6 +64,12 @@ QEglFSKmsCursor::QEglFSKmsCursor(QEglFSKmsScreen *screen)
, m_cursorImage(0, 0, 0, 0, 0, 0)
, m_visible(true)
{
QByteArray hideCursorVal = qgetenv("QT_QPA_EGLFS_HIDECURSOR");
if (!hideCursorVal.isEmpty())
m_visible = hideCursorVal.toInt() == 0;
if (!m_visible)
return;
uint64_t width, height;
if ((drmGetCap(m_screen->device()->fd(), DRM_CAP_CURSOR_WIDTH, &width) == 0)
&& (drmGetCap(m_screen->device()->fd(), DRM_CAP_CURSOR_HEIGHT, &height) == 0)) {