Files

105 lines
3.2 KiB
Diff

--- a/contents/lockscreen/LockScreenUi.qml
+++ b/contents/lockscreen/LockScreenUi.qml
@@ -83,20 +83,32 @@
}
}
+ Connections {
+ target: root
+ function onViewVisibleChanged() {
+ if (root.viewVisible) {
+ lockScreenRoot.uiVisible = true;
+ }
+ }
+ }
+
SessionManagement {
id: sessionManagement
}
KeyboardIndicator.KeyState {
id: capsLockState
key: Qt.Key_CapsLock
}
Connections {
target: sessionManagement
function onAboutToSuspend() {
root.clearPassword();
}
+ function onResumingFromSuspend() {
+ resumeAuthenticationTimer.restart();
+ }
}
RejectPasswordAnimation {
@@ -108,7 +120,6 @@
id: lockScreenRoot
property bool uiVisible: false
- property bool seenPositionChange: false
property bool blockUI: containsMouse && (mainStack.depth > 1 || mainBlock.mainPasswordBox.text.length > 0 || inputPanel.keyboardActive)
x: parent.x
@@ -118,13 +129,10 @@
width: parent.width
height: parent.height
hoverEnabled: true
- cursorShape: uiVisible ? Qt.ArrowCursor : Qt.BlankCursor
+ cursorShape: Qt.ArrowCursor
drag.filterChildren: true
onPressed: uiVisible = true;
- onPositionChanged: {
- uiVisible = seenPositionChange;
- seenPositionChange = true;
- }
+ onPositionChanged: uiVisible = true;
onUiVisibleChanged: {
if (uiVisible) {
Window.window.requestActivate();
@@ -135,6 +143,24 @@
}
authenticator.startAuthenticating();
}
+ Timer {
+ id: resumeAuthenticationTimer
+ interval: 1500
+ onTriggered: authenticator.startAuthenticating()
+ }
+ Timer {
+ id: postGraceAuthenticationTimer
+ // Retry once after Plasma's default five-second lock grace period.
+ interval: 6000
+ running: root.viewVisible
+ onTriggered: authenticator.startAuthenticating()
+ }
+ FedoraToolsFingerprintRetry {
+ auth: authenticator
+ fingerprintType: ScreenLocker.Authenticator.Fingerprint
+ enabled: root.viewVisible && !authenticator.unlocked
+ && !graceLockTimer.running && !resumeAuthenticationTimer.running
+ }
onBlockUIChanged: {
if (blockUI) {
fadeoutTimer.running = false;
@@ -194,6 +220,6 @@
WallpaperFader {
anchors.fill: parent
- state: lockScreenRoot.uiVisible ? "on" : "off"
+ state: "on"
source: wallpaper
mainStack: mainStack
footer: footer
@@ -211,7 +237,7 @@
samples: 15
spread: 0.2
color : Qt.rgba(0, 0, 0, 0.7)
- opacity: lockScreenRoot.uiVisible ? 0 : 1
+ opacity: 0
Behavior on opacity {
OpacityAnimator {
duration: Kirigami.Units.veryLongDuration * 2
@@ -265 +291 @@
- lockScreenUiVisible: lockScreenRoot.uiVisible
+ lockScreenUiVisible: true