mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-10 17:56:26 +00:00
Don't confine the cursor to the full-screen window when not capturing input
This commit is contained in:
@@ -867,8 +867,8 @@ void Session::toggleFullscreen()
|
||||
bool fullScreen = !(SDL_GetWindowFlags(m_Window) & m_FullScreenFlag);
|
||||
|
||||
if (fullScreen) {
|
||||
if (m_FullScreenFlag == SDL_WINDOW_FULLSCREEN) {
|
||||
// Confine the cursor to the window
|
||||
if (m_FullScreenFlag == SDL_WINDOW_FULLSCREEN && m_InputHandler->isCaptureActive()) {
|
||||
// Confine the cursor to the window if we're capturing input
|
||||
SDL_SetWindowGrab(m_Window, SDL_TRUE);
|
||||
}
|
||||
|
||||
@@ -1120,11 +1120,6 @@ void Session::exec(int displayOriginX, int displayOriginY)
|
||||
SDL_SetWindowResizable(m_Window, SDL_TRUE);
|
||||
}
|
||||
else {
|
||||
if (m_FullScreenFlag == SDL_WINDOW_FULLSCREEN) {
|
||||
// Confine the cursor to the window
|
||||
SDL_SetWindowGrab(m_Window, SDL_TRUE);
|
||||
}
|
||||
|
||||
// Update the window display mode based on our current monitor
|
||||
updateOptimalWindowDisplayMode();
|
||||
|
||||
@@ -1360,7 +1355,6 @@ DispatchDeferredCleanup:
|
||||
// Uncapture the mouse and hide the window immediately,
|
||||
// so we can return to the Qt GUI ASAP.
|
||||
m_InputHandler->setCaptureActive(false);
|
||||
SDL_SetWindowGrab(m_Window, SDL_FALSE);
|
||||
SDL_EnableScreenSaver();
|
||||
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "0");
|
||||
if (QGuiApplication::platformName() == "eglfs") {
|
||||
|
||||
Reference in New Issue
Block a user