Skip to content

Commit 44bc311

Browse files
committed
disable sleep inhibitor when lock-before-suspend disabled
1 parent 62b7492 commit 44bc311

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Services/SessionService.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ Singleton {
339339
if (SettingsData.loginctlLockIntegration) {
340340
syncLockBeforeSuspend()
341341
}
342+
syncSleepInhibitor()
342343
}
343344
}
344345

@@ -407,7 +408,7 @@ Singleton {
407408
if (!DMSService.apiVersion || DMSService.apiVersion < 4) return
408409

409410
DMSService.sendRequest("loginctl.setSleepInhibitorEnabled", {
410-
enabled: SettingsData.loginctlLockIntegration
411+
enabled: SettingsData.loginctlLockIntegration && SettingsData.lockBeforeSuspend
411412
}, response => {
412413
if (response.error) {
413414
console.warn("SessionService: Failed to sync sleep inhibitor:", response.error)

0 commit comments

Comments
 (0)