From 91be6c802804a27690949ec3bdc88fadc421126a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 15 Jan 2020 18:23:02 -0800 Subject: [PATCH] Only hide Qt's mouse cursor on EGLFS --- app/streaming/session.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index 45f923b4..9af42531 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -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();