mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
idle: fix idle monitors firing when bar isnt visible + keep awake is
active fixes #2698
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user