Fix lock input not working after switching tty or suspending

This commit is contained in:
2026-05-16 00:35:40 -07:00
parent 6a270c0450
commit a596dce33e

View File

@@ -14,6 +14,7 @@ WlSessionLock {
function instalock() {lock.animate = false; lock.locked = true}
function open() {lock.animate = true; lock.locked = true}
function close() {lock.locked = false}
property var clock: SystemClock {}
WlSessionLockSurface {
id: surface
color: "transparent"
@@ -35,19 +36,34 @@ WlSessionLock {
color: "#222222"
TextInput {
id: input
x: (parent.width - this.width)/2
Behavior on x { NumberAnimation {
duration: 300
easing.type: Easing.OutQuint
}}
anchors.verticalCenter: parent.verticalCenter
anchors.fill: parent
focus: true
color: "white"
font.pixelSize: 20
echoMode: TextInput.Password
echoMode: TextInput.NoEcho
cursorDelegate: Item {}
Keys.onReturnPressed: pam.start()
}
Row {
anchors.verticalCenter: parent.verticalCenter
x: (parent.width - this.width)/2
spacing: 4
Repeater {
model: input.text.length
Rectangle {
width: 8
height: width
radius: width/2
color: "white"
}
}
Behavior on x {
NumberAnimation {
duration: 300
easing.type: Easing.OutQuint
}
}
}
Text {
anchors {
horizontalCenter: parent.horizontalCenter