mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-13 08:21:03 -04:00
ime: apply text-input done updates on serial mismatch
This commit is contained in:
parent
c291194a4e
commit
0ca0b10a0f
1 changed files with 8 additions and 2 deletions
10
ime.c
10
ime.c
|
|
@ -156,10 +156,16 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
|
||||||
struct seat *seat = data;
|
struct seat *seat = data;
|
||||||
struct terminal *term = seat->ime_focus;
|
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",
|
LOG_DBG("IME serial mismatch: expected=0x%08x, got 0x%08x",
|
||||||
seat->ime.serial, serial);
|
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) {
|
if (term == NULL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue