From 339e1ad7adb8340732ee856d0f6f0d2c7f1455d1 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 14:14:28 +0300 Subject: Inline trivial internal helpers at their call sites --- src/platform/wayland/ime.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/platform/wayland/ime.c') diff --git a/src/platform/wayland/ime.c b/src/platform/wayland/ime.c index bd9375b..440b234 100644 --- a/src/platform/wayland/ime.c +++ b/src/platform/wayland/ime.c @@ -38,11 +38,6 @@ void ime_send_caret(struct wayland_surface *w) zwp_text_input_v3_commit(seat->text_input); } -const char *wayland_surface_ime_preedit(const struct wayland_surface *w) -{ - return w ? w->ime_shown : NULL; -} - bool wayland_surface_ime_preedit_cursor(const struct wayland_surface *w, int *begin, int *end) { if (!w || !w->ime_shown || w->ime_shown_begin < 0) @@ -65,7 +60,8 @@ static void text_input_enter(void *data, struct zwp_text_input_v3 *text_input, struct wl_surface *surface) { struct seat *s = data; - struct wayland_surface *w = surface_root(conn_surface_for(s->conn, surface)); + struct wayland_surface *w = surface_root(surface ? + (struct wayland_surface *)wl_surface_get_user_data(surface) : NULL); s->ime_focus = w; if (!w) return; zwp_text_input_v3_enable(text_input); -- cgit v1.2.3