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.
This commit is contained in:
Carlos Garnacho 2022-04-26 12:23:09 +02:00
parent 3af4d53945
commit d6fe6f495a

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));