1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

Fix idle monitor creation

This commit is contained in:
bbedward
2025-09-25 16:30:46 -04:00
parent 778b960130
commit 185ee20f2d

View File

@@ -71,7 +71,6 @@ Singleton {
}
`
if (monitorTimeout > 0) {
monitorOffMonitor = Qt.createQmlObject(qmlString, root, "IdleService.MonitorOffMonitor")
monitorOffMonitor.enabled = Qt.binding(() => root._enableGate && root.enabled && root.idleMonitorAvailable && root.monitorTimeout > 0)
monitorOffMonitor.respectInhibitors = Qt.binding(() => root.respectInhibitors)
@@ -83,9 +82,7 @@ Singleton {
root.requestMonitorOn()
}
})
}
if (lockTimeout > 0) {
lockMonitor = Qt.createQmlObject(qmlString, root, "IdleService.LockMonitor")
lockMonitor.enabled = Qt.binding(() => root._enableGate && root.enabled && root.idleMonitorAvailable && root.lockTimeout > 0)
lockMonitor.respectInhibitors = Qt.binding(() => root.respectInhibitors)
@@ -95,9 +92,7 @@ Singleton {
root.lockRequested()
}
})
}
if (suspendTimeout > 0) {
suspendMonitor = Qt.createQmlObject(qmlString, root, "IdleService.SuspendMonitor")
suspendMonitor.enabled = Qt.binding(() => root._enableGate && root.enabled && root.idleMonitorAvailable && root.suspendTimeout > 0)
suspendMonitor.respectInhibitors = Qt.binding(() => root.respectInhibitors)
@@ -107,9 +102,7 @@ Singleton {
root.requestSuspend()
}
})
}
if (hibernateTimeout > 0 && SessionService.hibernateSupported) {
hibernateMonitor = Qt.createQmlObject(qmlString, root, "IdleService.HibernateMonitor")
hibernateMonitor.enabled = Qt.binding(() => root._enableGate && root.enabled && root.idleMonitorAvailable && root.hibernateTimeout > 0)
hibernateMonitor.respectInhibitors = Qt.binding(() => root.respectInhibitors)
@@ -119,7 +112,6 @@ Singleton {
root.requestHibernate()
}
})
}
} catch (e) {
console.warn("IdleService: Error creating IdleMonitors:", e)
}