[gimp] app: remove preedit text on abort.



commit 97b537d4962d392c5ec5e327b3bc5675c5b9ca9d
Author: Jehan <jehan girinstud io>
Date:   Mon Jun 6 14:28:55 2016 +0200

    app: remove preedit text on abort.
    
    The IM should be the one taking care of it by sending the proper
    signals, and I would assume this should be done when we run:
    gtk_im_context_focus_out ().
    But it doesn't and leaves a dangling styled preedit text on leaving
    a text layer, either because the IME is not properly implemented (not
    reacting to the context leaving the focused widget), or GTK+2 is bugged,
    or maybe we just don't understand exactly how this all works. Anyway
    let's explicitly clean preedit text, not waiting for preedit-end or
    commit signals on IM abort.

 app/tools/gimptexttool-editor.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index bb05162..4255b88 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -556,6 +556,9 @@ gimp_text_tool_abort_im_context (GimpTextTool *text_tool)
   text_tool->needs_im_reset = TRUE;
   gimp_text_tool_reset_im_context (text_tool);
 
+  /* Making sure preedit text is removed. */
+  gimp_text_tool_im_delete_preedit (text_tool);
+
   /* the following lines seem to be the only way of really getting
    * rid of any ongoing preedit state, please somebody tell me
    * a clean way... mitch


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]