ime: render pre-edit text

This is done by allocating cells for the pre-edit text when receiving
the text-input::done() call, and populating them by converting the
utf-8 formatted pre-edit text to wchars.

We also convert the pre-edit cursor position to cell positions (it can
cover multiple cells).

When rendering, we simply render the pre-edit cells on-top off the
regular grid. While doing so, we also mark the underlying, “real”,
cells as dirty, to ensure they are re-rendered when the pre-edit text
is modified or removed.
This commit is contained in:
Daniel Eklöf 2020-12-02 18:52:50 +01:00
parent 5745c610ac
commit 8c3d48c5cd
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
8 changed files with 364 additions and 60 deletions

View file

@ -191,8 +191,8 @@ seat_destroy(struct seat *seat)
free(seat->clipboard.text);
free(seat->primary.text);
free(seat->ime.preedit.text);
free(seat->ime.commit.text);
free(seat->ime.preedit.pending.text);
free(seat->ime.commit.pending.text);
free(seat->name);
}