From cd4ee8ae49f7c3ba1441917decd2e4ebb804e4ab Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 17 Mar 2025 08:43:12 +0100 Subject: ime: fix initial cursor rectangle being reported as 0,0,0,0 Closes #1994 --- ime.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ime.c') diff --git a/ime.c b/ime.c index 54cfa908..c6ccb479 100644 --- a/ime.c +++ b/ime.c @@ -68,6 +68,16 @@ enter(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, /* The main grid is the *only* input-receiving surface we have */ seat->ime_focus = term; + + const struct coord *cursor = &term->grid->cursor.point; + + term_ime_set_cursor_rect( + term, + term->margins.left + cursor->col * term->cell_width, + term->margins.top + cursor->row * term->cell_height, + term->cell_width, + term->cell_height); + ime_enable(seat); } -- cgit v1.3