imcontextwayland: Ignore preedit updates from NULL to NULL

If we get consecutive preedit string updates that announce a NULL
string, we still do end up issuing ::preedit-changed with those.
Ignore changes from NULL to NULL, it is the other combinations which
must issue this signal.

(cherry-picked from commit d6fe6f495a)
This commit is contained in:
Carlos Garnacho 2022-04-26 12:23:09 +02:00
parent 21103ad811
commit c1895ad823

View File

@ -174,6 +174,9 @@ text_input_preedit_apply (GtkIMContextWaylandGlobal *global)
return;
context = GTK_IM_CONTEXT_WAYLAND (global->current);
if (context->pending_preedit.text == NULL &&
context->current_preedit.text == NULL)
return;
state_change = ((context->pending_preedit.text == NULL)
!= (context->current_preedit.text == NULL));