hints/unicode_input kittens: Do not lose keypresses that are sent very rapidly via an automation tool immediately after the kitten is launched

We now buffer the key events until the kitten tells us it is ready.
Without this the key presses are delivered to the underlying window
as the kitten's overlay window was not being focused until the kitten
set the ready message.

Fixes #7089
This commit is contained in:
Kovid Goyal
2024-12-12 13:11:12 +05:30
parent 9c1324e9d0
commit 9d48fa9126
10 changed files with 131 additions and 38 deletions

View File

@@ -217,11 +217,11 @@ func main(_ *cli.Command, o *Options, args []string) (rc int, err error) {
}
lp.OnInitialize = func() (string, error) {
lp.SendOverlayReady()
lp.SetCursorVisible(false)
lp.SetWindowTitle(window_title)
lp.AllowLineWrapping(false)
draw_screen()
lp.SendOverlayReady()
return "", nil
}
lp.OnFinalize = func() string {