diff options
Diffstat (limited to 'theme/components/LoginCard.qml')
| -rw-r--r-- | theme/components/LoginCard.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/theme/components/LoginCard.qml b/theme/components/LoginCard.qml index 5f336d0..d76269f 100644 --- a/theme/components/LoginCard.qml +++ b/theme/components/LoginCard.qml @@ -239,6 +239,15 @@ Item { sddm.login(usernameField.text, passwordField.text, sessionBox.currentIndex) } + // Return keyboard focus after the idle fade disabled the card: password + // when a username is already filled, else the username field. + function restoreFocus() { + if (usernameField.text.length > 0) + passwordField.forceActiveFocus() + else + usernameField.forceActiveFocus() + } + // Login failure wins the notice line; otherwise Caps Lock, if on. property string loginError: "" readonly property string message: { |
