lockscreen: Fix potential cause of input unresponsiveness

BUG: 484054
This is a potential fix for the input to stop working. There was unused code for passwordless login that could cause the "waitingForAuth" variable to never be set to false after user input.
This commit is contained in:
Devin Lin 2024-06-23 13:03:12 -04:00
parent e2e6590222
commit e044c84219
2 changed files with 10 additions and 32 deletions

View file

@ -32,7 +32,6 @@ QtObject {
if (root.password !== '') { // prevent typing lock when password is empty
waitingForAuth = true;
}
connections.hasPrompt = true;
authenticator.startAuthenticating();
}
@ -41,42 +40,21 @@ QtObject {
root.reset();
}
Component.onCompleted: {
// determine whether we have passwordless login
// if we do, authenticator will emit a success signal, otherwise it will emit failure
// TODO: Disabled for the time being, since it seems to cause an infinite loop
// authenticator.startAuthenticating();
}
property var connections: Connections {
target: authenticator
// false for our test of whether we have passwordless login, otherwise it's true
property bool hasPrompt: false
function onSucceeded() {
if (hasPrompt) {
console.log('login succeeded');
root.waitingForAuth = false;
root.unlockSucceeded();
Qt.quit();
}
console.log('login succeeded');
root.waitingForAuth = false;
root.unlockSucceeded();
Qt.quit();
}
function onFailed(kind) {
if (kind != 0) { // if this is coming from the noninteractive authenticators
return;
}
// root.passwordless = false;
if (hasPrompt) {
console.log('login failed');
root.waitingForAuth = false;
root.password = "";
root.unlockFailed();
}
function onFailed() {
console.log('login failed');
root.waitingForAuth = false;
root.password = "";
root.unlockFailed();
}
function onInfoMessageChanged() {

View file

@ -7,7 +7,7 @@ import QtQuick.Controls 2.15
import org.kde.plasma.components 3.0 as PC3
import org.kde.plasma.private.mobileshell as MobileShell
import "../lookandfeel/contents/lockscreen" as LockScreen
import "../shell/contents/lockscreen" as LockScreen
// This is a test app for the lockscreen, simulating kscreenlocker.
//