From 4abebe3aecde49721a4c835aa2453cd8379f5921 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 11 Jan 2020 02:06:08 -0800 Subject: [PATCH] Hide the Qt cursor when streaming --- app/streaming/session.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index d71a6767..45f923b4 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -30,6 +30,8 @@ #include #include #include +#include +#include CONNECTION_LISTENER_CALLBACKS Session::k_ConnCallbacks = { Session::clStageStarting, @@ -1057,6 +1059,9 @@ 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)); + // Set timer resolution to 1 ms on Windows for greater // sleep precision and more accurate callback timing. SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "1"); @@ -1269,6 +1274,7 @@ DispatchDeferredCleanup: m_InputHandler->setCaptureActive(false); SDL_EnableScreenSaver(); SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "0"); + QGuiApplication::restoreOverrideCursor(); // Raise any keys that are still down m_InputHandler->raiseAllKeys();