projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f494d6a
)
wayland: Don't emit signals if nothing changed
author
Matthias Clasen
<mclasen@redhat.com>
Tue, 27 Mar 2018 01:38:28 +0000
(21:38 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Tue, 27 Mar 2018 01:38:28 +0000
(21:38 -0400)
We were emitting a preedit-changed even if the preedit text did
not actually change, causing text views to scroll.
gtk/gtkimcontextwayland.c
patch
|
blob
|
history
diff --git
a/gtk/gtkimcontextwayland.c
b/gtk/gtkimcontextwayland.c
index af195581c8ca1300de527178f73787673e4f8154..5bb7ecd04d9f6481ba69857ec30b72b852b76a12 100644
(file)
--- a/
gtk/gtkimcontextwayland.c
+++ b/
gtk/gtkimcontextwayland.c
@@
-84,6
+84,9
@@
static GtkIMContextWaylandGlobal *global = NULL;
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");