aboutsummaryrefslogtreecommitdiffstats
path: root/theme/components/LoginCard.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-17 13:26:07 +0200
committerDanilo M. <danix@danix.xyz>2026-09-17 13:26:07 +0200
commit96841b1cef108130bcf1ab21c34cf89b92f1b35c (patch)
tree29ecfe725930f6e27e72574d7a8d43172370da7b /theme/components/LoginCard.qml
parent8f749d8b1fe5c2740d8829a78fbfbb3c739dade9 (diff)
downloadsddm-theme-udt-96841b1cef108130bcf1ab21c34cf89b92f1b35c.tar.gz
sddm-theme-udt-96841b1cef108130bcf1ab21c34cf89b92f1b35c.zip
fix: pin the login card per SDDM screen window
Diffstat (limited to 'theme/components/LoginCard.qml')
-rw-r--r--theme/components/LoginCard.qml9
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: {