From 9e083953c81fcfe2ce4ec61c644fc74a706a7987 Mon Sep 17 00:00:00 2001 From: Almamu Date: Tue, 6 May 2025 03:03:16 +0200 Subject: [PATCH] chore: the setting controls fullscreen detection creation the same way audio works --- src/WallpaperEngine/Application/CWallpaperApplication.cpp | 6 +----- src/WallpaperEngine/Render/Drivers/CVideoFactories.cpp | 3 +-- .../Render/Drivers/Detectors/CX11FullScreenDetector.cpp | 3 --- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/WallpaperEngine/Application/CWallpaperApplication.cpp b/src/WallpaperEngine/Application/CWallpaperApplication.cpp index f8706ce..ecfd3fb 100644 --- a/src/WallpaperEngine/Application/CWallpaperApplication.cpp +++ b/src/WallpaperEngine/Application/CWallpaperApplication.cpp @@ -408,11 +408,7 @@ void CWallpaperApplication::show () { // update input information m_videoDriver->getInputContext ().update (); // check for fullscreen windows and wait until there's none fullscreen - if ( - this->m_context.settings.render.pauseOnFullscreen && - this->m_fullScreenDetector->anythingFullscreen () && - this->m_context.state.general.keepRunning - ) { + if (this->m_fullScreenDetector->anythingFullscreen () && this->m_context.state.general.keepRunning) { m_renderContext->setPause (true); while (this->m_fullScreenDetector->anythingFullscreen () && this->m_context.state.general.keepRunning) usleep (FULLSCREEN_CHECK_WAIT_TIME); diff --git a/src/WallpaperEngine/Render/Drivers/CVideoFactories.cpp b/src/WallpaperEngine/Render/Drivers/CVideoFactories.cpp index b239c82..bf9df0f 100644 --- a/src/WallpaperEngine/Render/Drivers/CVideoFactories.cpp +++ b/src/WallpaperEngine/Render/Drivers/CVideoFactories.cpp @@ -83,8 +83,7 @@ std::unique_ptr CVideoFactories::createFullscre ) { const auto it = this->m_fullscreenFactories.find (xdgSessionType); - if (it == this->m_fullscreenFactories.end ()) { - //TODO: CONSTRUCT THE STUB + if (it == this->m_fullscreenFactories.end () || !context.settings.render.pauseOnFullscreen) { return std::make_unique (context); } diff --git a/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp b/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp index 363199e..8947a69 100644 --- a/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp +++ b/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp @@ -59,9 +59,6 @@ CX11FullScreenDetector::~CX11FullScreenDetector () { } bool CX11FullScreenDetector::anythingFullscreen () const { - if (!this->getApplicationContext ().settings.render.pauseOnFullscreen) - return false; - // stop rendering if anything is fullscreen bool isFullscreen = false; XWindowAttributes attribs;