mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Hide the Qt cursor when streaming
This commit is contained in:
@@ -30,6 +30,8 @@
|
|||||||
#include <QSvgRenderer>
|
#include <QSvgRenderer>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QCursor>
|
||||||
|
|
||||||
CONNECTION_LISTENER_CALLBACKS Session::k_ConnCallbacks = {
|
CONNECTION_LISTENER_CALLBACKS Session::k_ConnCallbacks = {
|
||||||
Session::clStageStarting,
|
Session::clStageStarting,
|
||||||
@@ -1057,6 +1059,9 @@ void Session::exec(int displayOriginX, int displayOriginY)
|
|||||||
// Disable the screen saver
|
// Disable the screen saver
|
||||||
SDL_DisableScreenSaver();
|
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
|
// Set timer resolution to 1 ms on Windows for greater
|
||||||
// sleep precision and more accurate callback timing.
|
// sleep precision and more accurate callback timing.
|
||||||
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "1");
|
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "1");
|
||||||
@@ -1269,6 +1274,7 @@ DispatchDeferredCleanup:
|
|||||||
m_InputHandler->setCaptureActive(false);
|
m_InputHandler->setCaptureActive(false);
|
||||||
SDL_EnableScreenSaver();
|
SDL_EnableScreenSaver();
|
||||||
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "0");
|
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "0");
|
||||||
|
QGuiApplication::restoreOverrideCursor();
|
||||||
|
|
||||||
// Raise any keys that are still down
|
// Raise any keys that are still down
|
||||||
m_InputHandler->raiseAllKeys();
|
m_InputHandler->raiseAllKeys();
|
||||||
|
|||||||
Reference in New Issue
Block a user