osk: mirror squeekboard's real Visible back into oskOpen
squeekboard auto-shows/hides itself on input-method focus without telling the shell; the stale flag left the dock suppressed and the rail floating at keyboard height. gdbus monitor on its Visible property is the single truth now.
This commit is contained in:
parent
47858d5b06
commit
3837698c8b
1 changed files with 24 additions and 0 deletions
|
|
@ -79,6 +79,30 @@ Scope {
|
|||
}
|
||||
}
|
||||
|
||||
// squeekboard auto-shows/hides ITSELF on input-method focus (e.g. a
|
||||
// sidebar taking or dropping a text field) without telling us. oskOpen
|
||||
// then lies: the dock stays suppressed and the gesture rail floats at
|
||||
// keyboard height over nothing until someone manually toggles. Mirror
|
||||
// squeekboard's real Visible property back into oskOpen so there is
|
||||
// exactly one truth. Setting oskOpen from here re-triggers SetVisible
|
||||
// with the value squeekboard already has, which is a harmless no-op.
|
||||
Process {
|
||||
id: oskVisMonitor
|
||||
running: true
|
||||
command: ["gdbus", "monitor", "--session",
|
||||
"--dest", "sm.puri.OSK0", "--object-path", "/sm/puri/OSK0"]
|
||||
stdout: SplitParser {
|
||||
onRead: line => {
|
||||
if (!line.includes("'Visible'")) return;
|
||||
const vis = line.includes("<true>");
|
||||
if (GlobalStates.oskOpen !== vis) {
|
||||
console.log("[osk] squeekboard self-" + (vis ? "showed" : "hid") + ", syncing oskOpen");
|
||||
GlobalStates.oskOpen = vis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "osk"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue