summaryrefslogtreecommitdiff
path: root/src/managers/input/IdleInhibitor.cpp
diff options
context:
space:
mode:
authorSungyoon Cho <sungyoon@sungyooncho.dev>2024-05-05 22:04:40 +0900
committerGitHub <noreply@github.com>2024-05-05 14:04:40 +0100
commit03ebad3cbff0999af885c03e83a506a9d9cb5919 (patch)
treeacb2f34d4a868e33122823d3cf5491259a02bb25 /src/managers/input/IdleInhibitor.cpp
parentaaf35b9f1f0ce49080f2a0b1e7943336b1ba6057 (diff)
idle-inhibit: enable idle inhibitor if no hl surface is associated (#5882)
Diffstat (limited to 'src/managers/input/IdleInhibitor.cpp')
-rw-r--r--src/managers/input/IdleInhibitor.cpp10
1 files changed, 6 insertions, 4 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);