summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-04-26 12:23:09 +0200
committerCarlos Garnacho <carlosg@gnome.org>2022-05-02 23:34:09 +0200
commit5321fa25a52f9d91ed0c2f5ec59afbd8fd2f770a (patch)
tree501823f8dc75a4cc3db2258e3481a9497295c5a9
parent49b6410c265727f0b2650b912b1cbc5806107d27 (diff)
downloadgtk+-5321fa25a52f9d91ed0c2f5ec59afbd8fd2f770a.tar.gz
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.
-rw-r--r--modules/input/imwayland.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/input/imwayland.c b/modules/input/imwayland.c
index 9b738208d9..1e93123aa2 100644
--- a/modules/input/imwayland.c
+++ b/modules/input/imwayland.c
@@ -171,6 +171,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));