fix: ensure that at least one frame is rendered before detecting fullscreen windows

This commit is contained in:
Almamu 2025-05-06 03:09:28 +02:00
parent 9e083953c8
commit 7908971970

View File

@ -407,13 +407,6 @@ void CWallpaperApplication::show () {
m_audioDriver->update ();
// update input information
m_videoDriver->getInputContext ().update ();
// check for fullscreen windows and wait until there's none fullscreen
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);
m_renderContext->setPause (false);
}
// process driver events
m_videoDriver->dispatchEventQueue ();
@ -421,6 +414,13 @@ void CWallpaperApplication::show () {
sLog.out ("Stop requested by driver");
this->m_context.state.general.keepRunning = false;
}
// check for fullscreen windows and wait until there's none fullscreen
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);
m_renderContext->setPause (false);
}
if (!this->m_context.settings.screenshot.take || m_videoDriver->getFrameCounter () < this->m_context.settings.screenshot.delay)
continue;