mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 05:46:48 +08:00
chore: the setting controls fullscreen detection creation the same way audio works
This commit is contained in:
parent
41f7db7b80
commit
9e083953c8
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user