Commit 74a80aaa authored by David Edmundson's avatar David Edmundson Committed by Nate Graham
Browse files

Lock screen: Avoid wiping password field when getting our first prompt

When the lockscreen is in the screensaver mode we want the keyboard key
pressed to wake the screen to go to the password box textfield. This did
work correctly, but a code path also reset it when we get the first
prompt.

In the (currently hypothetical) case of multiple prompts we would want
to clear anything in the prompt.

This uses the existing boolean flag to handle that appropriately.

BUG: 454108
parent f045cf30
Pipeline #180493 passed with stage
in 10 minutes and 51 seconds
......@@ -38,6 +38,7 @@ PlasmaCore.ColorScope {
graceLockTimer.restart();
notificationRemoveTimer.restart();
rejectPasswordAnimation.start();
lockScreenUi.hadPrompt = false;
}
function onSucceeded() {
......@@ -65,17 +66,21 @@ PlasmaCore.ColorScope {
}
function onPrompt(msg) {
lockScreenUi.hadPrompt = true;
root.notification = msg;
mainBlock.echoMode = TextInput.Normal
mainBlock.mainPasswordBox.text = "";
if (lockScreenUi.hadPrompt) {
mainBlock.mainPasswordBox.text = "";
}
mainBlock.mainPasswordBox.forceActiveFocus();
lockScreenUi.hadPrompt = true;
}
function onPromptForSecret(msg) {
lockScreenUi.hadPrompt = true;
mainBlock.echoMode = TextInput.Password
mainBlock.mainPasswordBox.text = "";
if (lockScreenUi.hadPrompt) {
mainBlock.mainPasswordBox.text = "";
}
mainBlock.mainPasswordBox.forceActiveFocus();
lockScreenUi.hadPrompt = true;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment