diff --git a/shell/contents/lockscreen/LockScreen.qml b/shell/contents/lockscreen/LockScreen.qml index fc36c6a5..66300249 100644 --- a/shell/contents/lockscreen/LockScreen.qml +++ b/shell/contents/lockscreen/LockScreen.qml @@ -103,13 +103,23 @@ Item { // Distance to swipe to fully open keypad keypadHeight: Kirigami.Units.gridUnit * 20 - // Unlock lockscreen if it's already unlocked + // Unlock lockscreen if it's already unlocked and keypad is opened onOpened: { if (root.lockScreenState.canBeUnlocked) { Qt.quit(); } } + // Unlock lockscreen if it's already unlocked and keypad is open + Connections { + target: root.lockScreenState + function onCanBeUnlockedChanged() { + if (root.lockScreenState.canBeUnlocked && flickable.openFactor > 0.8) { + Qt.quit(); + } + } + } + // Clear entered password after closing keypad onOpenFactorChanged: { if (flickable.openFactor < 0.1) {