mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 05:12:25 +08:00
fix: ensure that at least one frame is rendered before detecting fullscreen windows
This commit is contained in:
parent
9e083953c8
commit
7908971970
@ -407,13 +407,6 @@ void CWallpaperApplication::show () {
|
|||||||
m_audioDriver->update ();
|
m_audioDriver->update ();
|
||||||
// update input information
|
// update input information
|
||||||
m_videoDriver->getInputContext ().update ();
|
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
|
// process driver events
|
||||||
m_videoDriver->dispatchEventQueue ();
|
m_videoDriver->dispatchEventQueue ();
|
||||||
|
|
||||||
@ -421,6 +414,13 @@ void CWallpaperApplication::show () {
|
|||||||
sLog.out ("Stop requested by driver");
|
sLog.out ("Stop requested by driver");
|
||||||
this->m_context.state.general.keepRunning = false;
|
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)
|
if (!this->m_context.settings.screenshot.take || m_videoDriver->getFrameCounter () < this->m_context.settings.screenshot.delay)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user