Cherry-pick gtk-4-6 patch needed for mutter 42.1
authorJeremy Bicha <jeremy.bicha@canonical.com>
Mon, 9 May 2022 20:26:09 +0000 (16:26 -0400)
committerJeremy Bicha <jeremy.bicha@canonical.com>
Mon, 9 May 2022 20:26:09 +0000 (16:26 -0400)
LP: #1972722

debian/patches/imcontextwayland-Ignore-preedit-updates-from-NULL-to-NULL.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/imcontextwayland-Ignore-preedit-updates-from-NULL-to-NULL.patch b/debian/patches/imcontextwayland-Ignore-preedit-updates-from-NULL-to-NULL.patch
new file mode 100644 (file)
index 0000000..4ea95a4
--- /dev/null
@@ -0,0 +1,30 @@
+From: Carlos Garnacho <carlosg@gnome.org>
+Date: Tue, 26 Apr 2022 12:23:09 +0200
+Subject: 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 d6fe6f495a52de47927bf17ce3bc492a971c025f)
+
+(cherry picked from commit c1895ad8232ac4e0a15139c5a84a60a1b4fd90c0)
+---
+ gtk/gtkimcontextwayland.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c
+index ea9ed00..0690705 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));
index d94aadec079278e66ed424dce5bdd92473d3de62..7930379e2252ac5e77dbd85e257c8fd8bc2fa7ae 100644 (file)
@@ -10,3 +10,4 @@ gi-docgen/Disable-web-fonts-for-now.patch
 gi-docgen/templates-Remove-html5shiv.patch
 debian/Skip-some-known-failing-tests-on-mips-family-architecture.patch
 debian/Disable-clipboard-test.patch
+imcontextwayland-Ignore-preedit-updates-from-NULL-to-NULL.patch