From ae520620ac297229c7ffbbe7f17b54e97e915410 Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 2 Jul 2026 15:51:22 -0400 Subject: [PATCH] idle: fix idle monitors firing when bar isnt visible + keep awake is active fixes #2698 --- quickshell/Services/IdleService.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/quickshell/Services/IdleService.qml b/quickshell/Services/IdleService.qml index 8ce9919fe..95c123aaa 100644 --- a/quickshell/Services/IdleService.qml +++ b/quickshell/Services/IdleService.qml @@ -35,9 +35,13 @@ Singleton { onIsShellLockedChanged: _rearmIdleMonitors() function _applyMonitorEnableds() { - const base = enabled; + // Gate on the shell's own inhibit state rather than relying on the + // compositor honoring the bar-surface zwp_idle_inhibit inhibitor, + // which goes inactive whenever the bar surface is occluded + // (fullscreen windows) or hidden (auto-hide). + const base = enabled && !SessionService.idleInhibited; monitorOffMonitor.enabled = base && monitorTimeout > 0 && !postLockMonitorActive; - postLockMonitorOffMonitor.enabled = base && postLockMonitorActive; + postLockMonitorOffMonitor.enabled = enabled && postLockMonitorActive; lockMonitor.enabled = base && lockTimeout > 0; suspendMonitor.enabled = base && suspendTimeout > 0; } @@ -149,6 +153,14 @@ Singleton { } } + Connections { + target: SessionService + + function onIdleInhibitedChanged() { + root._rearmIdleMonitors(); + } + } + Connections { target: root function onRequestMonitorOff() {