85 lines
2.7 KiB
Diff
85 lines
2.7 KiB
Diff
--- a/contents/lockscreen/LockScreenUi.qml
|
|
+++ b/contents/lockscreen/LockScreenUi.qml
|
|
@@ -83,6 +83,15 @@
|
|
}
|
|
}
|
|
|
|
+ Connections {
|
|
+ target: root
|
|
+ function onViewVisibleChanged() {
|
|
+ if (root.viewVisible) {
|
|
+ lockScreenRoot.uiVisible = true;
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+
|
|
SessionManagement {
|
|
id: sessionManagement
|
|
}
|
|
@@ -108,7 +117,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
|
|
@@ -119,10 +127,7 @@
|
|
cursorShape: uiVisible ? Qt.ArrowCursor : Qt.BlankCursor
|
|
drag.filterChildren: true
|
|
onPressed: uiVisible = true;
|
|
- onPositionChanged: {
|
|
- uiVisible = seenPositionChange;
|
|
- seenPositionChange = true;
|
|
- }
|
|
+ onPositionChanged: uiVisible = true;
|
|
onUiVisibleChanged: {
|
|
if (uiVisible) {
|
|
Window.window.requestActivate();
|
|
@@ -135,6 +140,13 @@
|
|
}
|
|
authenticator.startAuthenticating();
|
|
}
|
|
+ Timer {
|
|
+ // Keep the authentication backend active while the prompt is visible.
|
|
+ interval: 1000
|
|
+ running: parent.uiVisible
|
|
+ repeat: true
|
|
+ onTriggered: authenticator.startAuthenticating()
|
|
+ }
|
|
onBlockUIChanged: {
|
|
if (blockUI) {
|
|
fadeoutTimer.running = false;
|
|
@@ -143,19 +155,12 @@
|
|
fadeoutTimer.restart();
|
|
}
|
|
}
|
|
- onExited: {
|
|
- uiVisible = false;
|
|
- }
|
|
Keys.onEscapePressed: {
|
|
- // If the escape key is pressed, kscreenlocker will turn off the screen.
|
|
- // We do not want to show the password prompt in this case.
|
|
- if (uiVisible) {
|
|
- uiVisible = false;
|
|
- if (inputPanel.keyboardActive) {
|
|
- inputPanel.showHide();
|
|
- }
|
|
- root.clearPassword();
|
|
+ // KScreenLocker will turn off the screen; leave the prompt ready for wake-up.
|
|
+ if (inputPanel.keyboardActive) {
|
|
+ inputPanel.showHide();
|
|
}
|
|
+ root.clearPassword();
|
|
}
|
|
Keys.onPressed: event => {
|
|
uiVisible = true;
|
|
@@ -167,7 +172,6 @@
|
|
onTriggered: {
|
|
if (!lockScreenRoot.blockUI) {
|
|
mainBlock.mainPasswordBox.showPassword = false;
|
|
- lockScreenRoot.uiVisible = false;
|
|
}
|
|
}
|
|
}
|