1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 03:28:28 -04:00

idle: fix screensaver inhibit interfering with manually triggered

inhibitor
This commit is contained in:
bbedward
2026-07-03 23:27:19 -04:00
parent 1c5965f1e4
commit 2861cc89c6
2 changed files with 4 additions and 14 deletions
+1 -1
View File
@@ -663,7 +663,7 @@ PanelWindow {
IdleInhibitor {
window: barWindow
enabled: SessionService.idleInhibited
enabled: SessionService.idleInhibited || IdleService.externalInhibitActive
}
Connections {
+3 -13
View File
@@ -39,7 +39,7 @@ Singleton {
// 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;
const base = enabled && !SessionService.idleInhibited && !externalInhibitActive;
monitorOffMonitor.enabled = base && monitorTimeout > 0 && !postLockMonitorActive;
postLockMonitorOffMonitor.enabled = enabled && postLockMonitorActive;
lockMonitor.enabled = base && lockTimeout > 0;
@@ -182,21 +182,11 @@ Singleton {
if (externalInhibitActive) {
const apps = DMSService.screensaverInhibitors.map(i => i.appName).join(", ");
log.info("External idle inhibit active from:", apps || "unknown");
SessionService.idleInhibited = true;
SessionService.inhibitReason = "External app: " + (apps || "unknown");
} else {
log.info("External idle inhibit released");
SessionService.idleInhibited = false;
SessionService.inhibitReason = "Keep system awake";
}
_rearmIdleMonitors();
}
Component.onCompleted: {
_applyMonitorEnableds();
if (externalInhibitActive) {
const apps = DMSService.screensaverInhibitors.map(i => i.appName).join(", ");
SessionService.idleInhibited = true;
SessionService.inhibitReason = "External app: " + (apps || "unknown");
}
}
Component.onCompleted: _applyMonitorEnableds()
}