1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

lock: prevent sending lockerReady during unlock

This commit is contained in:
bbedward
2025-11-03 15:03:31 -05:00
parent aef9c2269a
commit 5ed449773c

View File

@@ -62,6 +62,7 @@ Item {
function sendLockerReadyOnce() { function sendLockerReadyOnce() {
if (lockerReadySent) return; if (lockerReadySent) return;
if (root.unlocking) return;
lockerReadySent = true; lockerReadySent = true;
if (SessionService.loginctlAvailable && DMSService.apiVersion >= 2) { if (SessionService.loginctlAvailable && DMSService.apiVersion >= 2) {
DMSService.sendRequest("loginctl.lockerReady", null, resp => { DMSService.sendRequest("loginctl.lockerReady", null, resp => {
@@ -73,9 +74,10 @@ Item {
function maybeSend() { function maybeSend() {
if (!lockerReadyArmed) return; if (!lockerReadyArmed) return;
if (root.unlocking) return;
if (!root.visible || root.opacity <= 0) return; if (!root.visible || root.opacity <= 0) return;
Qt.callLater(() => { Qt.callLater(() => {
if (root.visible && root.opacity > 0) if (root.visible && root.opacity > 0 && !root.unlocking)
sendLockerReadyOnce(); sendLockerReadyOnce();
}); });
} }
@@ -1241,6 +1243,7 @@ Item {
lockSecured: !demoMode lockSecured: !demoMode
onUnlockRequested: { onUnlockRequested: {
root.unlocking = true root.unlocking = true
lockerReadyArmed = false
passwordField.text = "" passwordField.text = ""
root.passwordBuffer = "" root.passwordBuffer = ""
root.unlockRequested() root.unlockRequested()