From 0d32ab3f62dc6c5c15f542f4e045106ed795c058 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 13 Feb 2022 20:18:12 +0100 Subject: [PATCH] app: [Wayland] process key repeat events properly The recent IME changes broke Wayland key repeating. This change fixes it. Fixes: https://todo.sr.ht/~eliasnaur/gio/359 Signed-off-by: Elias Naur --- app/os_wayland.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/os_wayland.go b/app/os_wayland.go index 988d1987..39213ad4 100644 --- a/app/os_wayland.go +++ b/app/os_wayland.go @@ -1297,7 +1297,12 @@ func (r *repeatState) Repeat(d *wlDisplay) { break } for _, e := range d.xkb.DispatchKey(r.key, key.Press) { - r.win.Event(e) + if ee, ok := e.(key.EditEvent); ok { + // There's no support for IME yet. + r.win.EditorInsert(ee.Text) + } else { + r.win.Event(e) + } } r.last += delay }