mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56: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
|
// update input information
|
||||||
m_videoDriver->getInputContext ().update ();
|
m_videoDriver->getInputContext ().update ();
|
||||||
// check for fullscreen windows and wait until there's none fullscreen
|
// check for fullscreen windows and wait until there's none fullscreen
|
||||||
if (
|
if (this->m_fullScreenDetector->anythingFullscreen () && this->m_context.state.general.keepRunning) {
|
||||||
this->m_context.settings.render.pauseOnFullscreen &&
|
|
||||||
this->m_fullScreenDetector->anythingFullscreen () &&
|
|
||||||
this->m_context.state.general.keepRunning
|
|
||||||
) {
|
|
||||||
m_renderContext->setPause (true);
|
m_renderContext->setPause (true);
|
||||||
while (this->m_fullScreenDetector->anythingFullscreen () && this->m_context.state.general.keepRunning)
|
while (this->m_fullScreenDetector->anythingFullscreen () && this->m_context.state.general.keepRunning)
|
||||||
usleep (FULLSCREEN_CHECK_WAIT_TIME);
|
usleep (FULLSCREEN_CHECK_WAIT_TIME);
|
||||||
|
@ -83,8 +83,7 @@ std::unique_ptr <Detectors::CFullScreenDetector> CVideoFactories::createFullscre
|
|||||||
) {
|
) {
|
||||||
const auto it = this->m_fullscreenFactories.find (xdgSessionType);
|
const auto it = this->m_fullscreenFactories.find (xdgSessionType);
|
||||||
|
|
||||||
if (it == this->m_fullscreenFactories.end ()) {
|
if (it == this->m_fullscreenFactories.end () || !context.settings.render.pauseOnFullscreen) {
|
||||||
//TODO: CONSTRUCT THE STUB
|
|
||||||
return std::make_unique <Detectors::CFullScreenDetector> (context);
|
return std::make_unique <Detectors::CFullScreenDetector> (context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,9 +59,6 @@ CX11FullScreenDetector::~CX11FullScreenDetector () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CX11FullScreenDetector::anythingFullscreen () const {
|
bool CX11FullScreenDetector::anythingFullscreen () const {
|
||||||
if (!this->getApplicationContext ().settings.render.pauseOnFullscreen)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// stop rendering if anything is fullscreen
|
// stop rendering if anything is fullscreen
|
||||||
bool isFullscreen = false;
|
bool isFullscreen = false;
|
||||||
XWindowAttributes attribs;
|
XWindowAttributes attribs;
|
||||||
|
Loading…
Reference in New Issue
Block a user