diff options
-rw-r--r-- | src/managers/input/IdleInhibitor.cpp | 10 | ||||
-rw-r--r-- | src/managers/input/InputManager.hpp | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/managers/input/IdleInhibitor.cpp b/src/managers/input/IdleInhibitor.cpp index dc7c61c3..468ea58b 100644 --- a/src/managers/input/IdleInhibitor.cpp +++ b/src/managers/input/IdleInhibitor.cpp @@ -17,8 +17,8 @@ void CInputManager::newIdleInhibitor(std::any inhibitor) { auto WLSurface = CWLSurface::surfaceFromWlr(PINHIBIT->inhibitor->surface); if (!WLSurface) { - Debug::log(LOG, "Inhibitor has no HL Surface attached to it, likely meaning it's a non-desktop element. Ignoring."); - PINHIBIT->inert = true; + Debug::log(LOG, "Inhibitor has no HL Surface attached to it, likely meaning it's a non-desktop element. Assuming it's visible."); + PINHIBIT->nonDesktop = true; recheckIdleInhibitorStatus(); return; } @@ -32,8 +32,10 @@ void CInputManager::newIdleInhibitor(std::any inhibitor) { void CInputManager::recheckIdleInhibitorStatus() { for (auto& ii : m_vIdleInhibitors) { - if (ii->inert) - continue; + if (ii->nonDesktop) { + PROTO::idle->setInhibit(true); + return; + } auto WLSurface = CWLSurface::surfaceFromWlr(ii->inhibitor->surface); diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index 719e19c6..329748b2 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -242,7 +242,7 @@ class CInputManager { // idle inhibitors struct SIdleInhibitor { std::shared_ptr<CIdleInhibitor> inhibitor; - bool inert = false; + bool nonDesktop = false; CHyprSignalListener surfaceDestroyListener; }; std::vector<std::unique_ptr<SIdleInhibitor>> m_vIdleInhibitors; |