[gtk/gtk-3-22] wayland: Don't emit signals if nothing changed
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-22] wayland: Don't emit signals if nothing changed
- Date: Wed, 4 Apr 2018 08:41:43 +0000 (UTC)
commit 4b95d7406821196615149fb2527840ff14626a03
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 26 21:38:28 2018 -0400
wayland: Don't emit signals if nothing changed
We were emitting a preedit-changed even if the preedit text did
not actually change, causing text views to scroll.
https://gitlab.gnome.org/GNOME/gtk/issues/132
https://gitlab.gnome.org/GNOME/gtk/merge_requests/83#note_93411
modules/input/imwayland.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/modules/input/imwayland.c b/modules/input/imwayland.c
index 89b2f7af1a..bc710450d5 100644
--- a/modules/input/imwayland.c
+++ b/modules/input/imwayland.c
@@ -101,6 +101,9 @@ static const GtkIMContextInfo *info_list[] =
static void
reset_preedit (GtkIMContextWayland *context)
{
+ if (context->preedit.text == NULL)
+ return;
+
g_clear_pointer (&context->preedit.text, g_free);
context->preedit.cursor_idx = 0;
g_signal_emit_by_name (context, "preedit-changed");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]