[gtk/wip/carlosg/ignore-null-preedit] imcontextwayland: Ignore preedit updates from NULL to NULL
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/ignore-null-preedit] imcontextwayland: Ignore preedit updates from NULL to NULL
- Date: Tue, 26 Apr 2022 11:14:08 +0000 (UTC)
commit d6fe6f495a52de47927bf17ce3bc492a971c025f
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Apr 26 12:23:09 2022 +0200
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.
gtk/gtkimcontextwayland.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c
index ea9ed00cfc..069070509a 100644
--- a/gtk/gtkimcontextwayland.c
+++ b/gtk/gtkimcontextwayland.c
@@ -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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]