diff options
Diffstat (limited to 'src/platform/wayland/ime.c')
| -rw-r--r-- | src/platform/wayland/ime.c | 8 |
1 files changed, 2 insertions, 6 deletions
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); |
