lock: refactor

This commit is contained in:
2 * r + 2 * t 2025-08-17 15:50:34 +10:00
parent c98a0fb267
commit 53bfe29a40
2 changed files with 2 additions and 5 deletions

View file

@ -124,7 +124,7 @@ ColumnLayout {
}
Keys.onPressed: event => {
if (!root.lock.locked)
if (root.lock.unlocking)
return;
if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return)

View file

@ -13,10 +13,8 @@ WlSessionLockSurface {
required property WlSessionLock lock
required property Pam pam
readonly property alias unlocking: unlockAnim.running
readonly property bool animating: initAnim.running || unlockAnim.running
property bool locked
Component.onCompleted: locked = true
color: "transparent"
@ -24,7 +22,6 @@ WlSessionLockSurface {
target: root.lock
function onUnlock(): void {
root.locked = false;
unlockAnim.start();
}
}