]> Pileus Git - ~andy/gtk/blobdiff - modules/input/gtkimcontextxim.c
Fix incorrect return value, filter out returns of 0x7f for the delete key.
[~andy/gtk] / modules / input / gtkimcontextxim.c
index ec7565aeefd5dfcea4c6e30b0ff15b425e746f91..a76b667de1de86dadd52c1d9b5c49cc4f1b3c7dd 100644 (file)
@@ -379,9 +379,10 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context,
       result_utf8 = mb_to_utf8 (context_xim, buffer);
       if (result_utf8)
        {
-         if ((guchar)result_utf8[0] >= 0x20) /* Some IM have a nasty habit of converting
-                                              * control characters into strings
-                                              */
+         if ((guchar)result_utf8[0] >= 0x20 &&
+             result_utf8[0] != 0x7f) /* Some IM have a nasty habit of converting
+                                      * control characters into strings
+                                      */
            {
              g_signal_emit_by_name (context, "commit", result_utf8);
              result = TRUE;
@@ -391,7 +392,7 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context,
        }
     }
 
-  return FALSE;
+  return result;
 }
 
 static void