Watch
1
0
Fork
You've already forked souveraine
0

unlocking closes a keyboard nobody asked for

This commit is contained in:
Fimeg 2026-08-05 21:55:11 -04:00
commit a5f0fadba8

View file

@ -251,6 +251,28 @@ Scope {
GlobalStates.oskOpen = false; GlobalStates.oskOpen = false;
} }
// Unlocking must not leave a keyboard behind.
//
// Nothing asks for one the lock module never touches `oskOpen`, and only
// polkit takes a hold. squeekboard/stevia self-show whenever input-method
// focus lands on them (GlobalStates' own note: "self-showed / self-hid
// every couple of seconds, ending in Visible=true with no keyboard in front
// of the user"), and the surfaces coming back at unlock are exactly such a
// focus change. So this is not a hold to release, it is a keyboard nobody
// requested closed on the unlock edge, the same place the state machine
// treats as "the session is yours again".
//
// `userClose()`, not `oskOpen = false`: it drops holds too, so a stale
// polkit hold taken before the lock cannot re-assert the keyboard the
// instant this clears.
Connections {
target: GlobalStates
function onScreenLockSecureChanged() {
if (!GlobalStates.screenLockSecure && GlobalStates.oskOpen)
root.userClose();
}
}
IpcHandler { IpcHandler {
target: "osk" target: "osk"