From 8c3d48c5cdb2ae4e8bdbdc48f155f53d1a92973b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 2 Dec 2020 18:52:50 +0100 Subject: ime: render pre-edit text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- wayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wayland.c') diff --git a/wayland.c b/wayland.c index ecaecb1c..c0a9c512 100644 --- a/wayland.c +++ b/wayland.c @@ -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); } -- cgit v1.3