[vte] widget: Don't forward key release to input method when input is disabled



commit 0c45fbb7e3ed5afb8b82c3a151cdda2041a562ce
Author: Christian Persch <chpe gnome org>
Date:   Sun Apr 20 13:23:19 2014 +0200

    widget: Don't forward key release to input method when input is disabled

 src/vte.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 3888922..8617b73 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5275,8 +5275,12 @@ vte_terminal_key_release(GtkWidget *widget, GdkEventKey *event)
 
        vte_terminal_read_modifiers (terminal, (GdkEvent*) event);
 
-       return gtk_widget_get_realized (&terminal->widget)
-                       && gtk_im_context_filter_keypress (terminal->pvt->im_context, event);
+       if (gtk_widget_get_realized (&terminal->widget) &&
+            terminal->pvt->input_enabled &&
+            gtk_im_context_filter_keypress (terminal->pvt->im_context, event))
+                return TRUE;
+
+        return FALSE;
 }
 
 /*


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