aboutsummaryrefslogtreecommitdiff
path: root/ime.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-03-17 07:43:12 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-03-17 07:43:12 +0000
commitcd4ee8ae49f7c3ba1441917decd2e4ebb804e4ab (patch)
treeab132268b9bd7cc6be90e889f4d95c14b76043a3 /ime.c
parentmain/client: simplify code for printing --version string (diff)
ime: fix initial cursor rectangle being reported as 0,0,0,0
Closes #1994
Diffstat (limited to 'ime.c')
-rw-r--r--ime.c10
1 files changed, 10 insertions, 0 deletions
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);
}