Only hide Qt's mouse cursor on EGLFS

This commit is contained in:
Cameron Gutman 2020-01-15 18:23:02 -08:00
parent 2e0bd2ec28
commit 91be6c8028

View File

@ -1059,8 +1059,10 @@ void Session::exec(int displayOriginX, int displayOriginY)
// Disable the screen saver
SDL_DisableScreenSaver();
// Hide the mouse cursor (relevant on EGLFS/KMSDRM systems)
QGuiApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
// Hide Qt's fake mouse cursor on EGLFS systems
if (QGuiApplication::platformName() == "eglfs") {
QGuiApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
}
// Set timer resolution to 1 ms on Windows for greater
// sleep precision and more accurate callback timing.
@ -1274,7 +1276,9 @@ DispatchDeferredCleanup:
m_InputHandler->setCaptureActive(false);
SDL_EnableScreenSaver();
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "0");
QGuiApplication::restoreOverrideCursor();
if (QGuiApplication::platformName() == "eglfs") {
QGuiApplication::restoreOverrideCursor();
}
// Raise any keys that are still down
m_InputHandler->raiseAllKeys();