diff --git a/surfaces/quickshell/GlobalStates.qml b/surfaces/quickshell/GlobalStates.qml index 3a7cc95..89668d5 100644 --- a/surfaces/quickshell/GlobalStates.qml +++ b/surfaces/quickshell/GlobalStates.qml @@ -88,6 +88,25 @@ Singleton { root.oskHolds = []; root.oskHoldRestoreOpen = false; } + + // Locking closes the keyboard, and unlocking does not bring it back. + // + // `oskHoldRestoreOpen` remembers whether the keyboard was up when the + // first hold was taken, so releasing the last hold restores rather than + // clobbers it. Across a lock that restore is wrong: the keyboard was up + // because of something the user was typing into before they put the phone + // down, and the first thing they see on unlocking is a keyboard over + // whatever they actually came back for. + // + // Intent to type does not survive the screen going away. Anything that + // still wants the keyboard — a field taking focus again — will ask for it, + // which is the path that already works. + onScreenLockedChanged: { + if (!root.screenLocked) return; + root.oskHolds = []; + root.oskHoldRestoreOpen = false; + root.oskOpen = false; + } // WRITER: ii overlay module property bool overlayOpen: false // WRITER: ii overview module + Dock.qml IPC