From 2dda65078f9be61008363a13920d851d544d33bb Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 30 Jan 2026 21:07:01 -0600 Subject: [PATCH] Remove D3D9Ex focus loss hint workaround SDL3 doesn't suffer this bug and keeping the default SDL3 auto behavior (minimize iff in exclusive mode) is a better UX. --- app/streaming/video/ffmpeg-renderers/dxva2.cpp | 7 ------- app/streaming/video/ffmpeg-renderers/sdlvid.cpp | 9 --------- 2 files changed, 16 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/dxva2.cpp b/app/streaming/video/ffmpeg-renderers/dxva2.cpp index a874cf40..b316868d 100644 --- a/app/streaming/video/ffmpeg-renderers/dxva2.cpp +++ b/app/streaming/video/ffmpeg-renderers/dxva2.cpp @@ -597,13 +597,6 @@ bool DXVA2Renderer::initialize(PDECODER_PARAMETERS params) return false; } - // For some reason, using Direct3D9Ex breaks this with multi-monitor setups. - // When focus is lost, the window is minimized then immediately restored without - // input focus. This glitches out the renderer and a bunch of other stuff. - // Direct3D9Ex itself seems to have this minimize on focus loss behavior on its - // own, so just disable SDL's handling of the focus loss event. - SDL_SetHintWithPriority(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0", SDL_HINT_OVERRIDE); - return true; } diff --git a/app/streaming/video/ffmpeg-renderers/sdlvid.cpp b/app/streaming/video/ffmpeg-renderers/sdlvid.cpp index b2f2687b..5b3ec3bd 100644 --- a/app/streaming/video/ffmpeg-renderers/sdlvid.cpp +++ b/app/streaming/video/ffmpeg-renderers/sdlvid.cpp @@ -219,15 +219,6 @@ bool SdlRenderer::initialize(PDECODER_PARAMETERS params) return false; } -#ifdef Q_OS_WIN32 - // For some reason, using Direct3D9Ex breaks this with multi-monitor setups. - // When focus is lost, the window is minimized then immediately restored without - // input focus. This glitches out the renderer and a bunch of other stuff. - // Direct3D9Ex itself seems to have this minimize on focus loss behavior on its - // own, so just disable SDL's handling of the focus loss event. - SDL_SetHintWithPriority(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0", SDL_HINT_OVERRIDE); -#endif - return true; }