chore: the setting controls fullscreen detection creation the same way audio works

This commit is contained in:
Almamu 2025-05-06 03:03:16 +02:00
parent 41f7db7b80
commit 9e083953c8
3 changed files with 2 additions and 10 deletions

View File

@ -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);

View File

@ -83,8 +83,7 @@ std::unique_ptr <Detectors::CFullScreenDetector> 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 <Detectors::CFullScreenDetector> (context);
}

View File

@ -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;