mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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:
parent
e2e6590222
commit
e044c84219
2 changed files with 10 additions and 32 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in a new issue