mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-05 13:08:29 -04:00
lock: set LockedHint when locking with loginctl lock integration
- was previously read-only fixes #2732
This commit is contained in:
@@ -49,6 +49,12 @@ Scope {
|
||||
lock();
|
||||
}
|
||||
|
||||
function notifyLockedHint(locked: bool) {
|
||||
if (!SettingsData.loginctlLockIntegration || !DMSService.isConnected)
|
||||
return;
|
||||
DMSService.setLockedHint(locked, () => {});
|
||||
}
|
||||
|
||||
function notifyLoginctl(lockAction: bool) {
|
||||
if (!SettingsData.loginctlLockIntegration || !DMSService.isConnected)
|
||||
return;
|
||||
@@ -217,6 +223,7 @@ Scope {
|
||||
target: sessionLock
|
||||
|
||||
function onLockedChanged() {
|
||||
notifyLockedHint(sessionLock.locked);
|
||||
if (sessionLock.locked) {
|
||||
pendingLock = false;
|
||||
if (lockPowerOffArmed && SettingsData.lockScreenPowerOffMonitorsOnLock) {
|
||||
|
||||
@@ -620,6 +620,12 @@ Singleton {
|
||||
sendRequest("loginctl.unlock", null, callback);
|
||||
}
|
||||
|
||||
function setLockedHint(locked, callback) {
|
||||
sendRequest("loginctl.setLockedHint", {
|
||||
"locked": locked
|
||||
}, callback);
|
||||
}
|
||||
|
||||
function bluetoothPair(devicePath, callback) {
|
||||
sendRequest("bluetooth.pair", {
|
||||
"device": devicePath
|
||||
|
||||
Reference in New Issue
Block a user