diff --git a/implementations/Crafter.Graphics-Device.cpp b/implementations/Crafter.Graphics-Device.cpp index 0142585..9abc596 100644 --- a/implementations/Crafter.Graphics-Device.cpp +++ b/implementations/Crafter.Graphics-Device.cpp @@ -455,6 +455,12 @@ void Device::ApplyTextInput(Window* window) { if (!window->textInputEnabled_) return; window->textInputEnabled_ = false; zwp_text_input_v3_disable(textInput); + // The disable ends the composition as a leave does: the next enable + // starts afresh, so the record of what the window was last told goes + // with it (a composition equal to it after the enable is new). + textInputHasPreedit = textInputHasCommit = textInputHasDelete = false; + TextStrings().preedit.clear(); + TextStrings().shown.clear(); } zwp_text_input_v3_commit(textInput); wl_display_flush(display);