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 <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-02-13 20:18:12 +01:00
parent 31f55232bf
commit 0d32ab3f62
+6 -1
View File
@@ -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
}