mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-06 05:28:29 -04:00
lock: add resilience for when the lock surface is rejected
related #2778
related #2841
port 1.5
(cherry picked from commit 698b66cf91)
This commit is contained in:
@@ -80,6 +80,8 @@ Singleton {
|
||||
respectInhibitors: root.respectInhibitors
|
||||
enabled: false
|
||||
onIsIdleChanged: {
|
||||
if (!enabled)
|
||||
return;
|
||||
if (isIdle) {
|
||||
if (SettingsData.fadeToDpmsEnabled) {
|
||||
root.fadeToDpmsRequested();
|
||||
@@ -101,6 +103,8 @@ Singleton {
|
||||
respectInhibitors: root.respectInhibitors
|
||||
enabled: false
|
||||
onIsIdleChanged: {
|
||||
if (!enabled)
|
||||
return;
|
||||
if (isIdle) {
|
||||
root.requestMonitorOff();
|
||||
} else {
|
||||
@@ -115,6 +119,8 @@ Singleton {
|
||||
respectInhibitors: root.respectInhibitors
|
||||
enabled: false
|
||||
onIsIdleChanged: {
|
||||
if (!enabled)
|
||||
return;
|
||||
if (isIdle) {
|
||||
if (SettingsData.fadeToLockEnabled) {
|
||||
root.fadeToLockRequested();
|
||||
@@ -135,6 +141,8 @@ Singleton {
|
||||
respectInhibitors: root.respectInhibitors
|
||||
enabled: false
|
||||
onIsIdleChanged: {
|
||||
if (!enabled)
|
||||
return;
|
||||
if (isIdle)
|
||||
root.requestSuspend();
|
||||
}
|
||||
@@ -149,6 +157,8 @@ Singleton {
|
||||
respectInhibitors: false
|
||||
enabled: root.enabled && root.isShellLocked && root.monitorsOff && (SettingsData.lockScreenPowerOffMonitorsOnLock || root.lockPowerOffRequested)
|
||||
onIsIdleChanged: {
|
||||
if (!enabled)
|
||||
return;
|
||||
if (!isIdle && root.monitorsOff)
|
||||
root.requestMonitorOn();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user