From 0ca0b10a0f2622e4611204fd824151c30068acb8 Mon Sep 17 00:00:00 2001 From: stalkerg Date: Wed, 18 Feb 2026 15:28:26 +0900 Subject: [PATCH] ime: apply text-input done updates on serial mismatch --- ime.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ime.c b/ime.c index c6ccb479..cb065fd9 100644 --- a/ime.c +++ b/ime.c @@ -156,10 +156,16 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, struct seat *seat = data; struct terminal *term = seat->ime_focus; - if (seat->ime.serial != serial) { + const bool serial_matches = seat->ime.serial == serial; + if (!serial_matches) { LOG_DBG("IME serial mismatch: expected=0x%08x, got 0x%08x", seat->ime.serial, serial); - return; + + /* + * A serial mismatch is explicitly allowed by the protocol; + * we must still apply preedit/commit updates from this done() + * event. + */ } if (term == NULL) {