mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-07 22:18:30 -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()
|
onIsShellLockedChanged: _rearmIdleMonitors()
|
||||||
|
|
||||||
function _applyMonitorEnableds() {
|
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;
|
monitorOffMonitor.enabled = base && monitorTimeout > 0 && !postLockMonitorActive;
|
||||||
postLockMonitorOffMonitor.enabled = base && postLockMonitorActive;
|
postLockMonitorOffMonitor.enabled = enabled && postLockMonitorActive;
|
||||||
lockMonitor.enabled = base && lockTimeout > 0;
|
lockMonitor.enabled = base && lockTimeout > 0;
|
||||||
suspendMonitor.enabled = base && suspendTimeout > 0;
|
suspendMonitor.enabled = base && suspendTimeout > 0;
|
||||||
}
|
}
|
||||||
@@ -149,6 +153,14 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: SessionService
|
||||||
|
|
||||||
|
function onIdleInhibitedChanged() {
|
||||||
|
root._rearmIdleMonitors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: root
|
target: root
|
||||||
function onRequestMonitorOff() {
|
function onRequestMonitorOff() {
|
||||||
|
|||||||
Reference in New Issue
Block a user