[PATCH 05/13] editor: Reset text model on reset

Jan Arne Petersen jpetersen at openismus.com
Tue Feb 19 10:26:59 PST 2013


From: Jan Arne Petersen <jpetersen at openismus.com>

There were some reset calls missing, which resulted in wrong preedit
state on input method side.

Signed-off-by: Jan Arne Petersen <jpetersen at openismus.com>
---
 clients/editor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/clients/editor.c b/clients/editor.c
index 7ad6ced..eef5e4d 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -700,6 +700,9 @@ text_entry_commit_and_reset(struct text_entry *entry)
 		text_entry_insert_at_cursor(entry, commit, 0, 0);
 		free(commit);
 	}
+
+	entry->serial++;
+	text_model_reset(entry->model, entry->serial);
 }
 
 static void
@@ -763,10 +766,6 @@ text_entry_set_cursor_position(struct text_entry *entry,
 				 &index, &trailing);
 	entry->cursor = index + trailing;
 
-	entry->serial++;
-
-	text_model_reset(entry->model, entry->serial);
-
 	text_entry_update_layout(entry);
 
 	widget_schedule_redraw(entry->widget);
-- 
1.8.1.2



More information about the wayland-devel mailing list