[gtk: 2/3] GtkIMContextIME: Ignore ASCII control characters




commit 52616dee8e00e0191098bb7140a1dd5e3a7c211d
Author: Philip Zander <philip zander gmail com>
Date:   Mon Jan 17 11:56:48 2022 +0100

    GtkIMContextIME: Ignore ASCII control characters
    
    Make GtkIMContextIME ignore ASCII control characters just like other
    IMContext implementations (e.G. GtkIMContextSimple). Fixes bogus
    characters appearing in text input fields (old bug 676077).

 gtk/gtkimcontextime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index 6025239543..5c9282b59d 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -382,7 +382,7 @@ gtk_im_context_ime_filter_keypress (GtkIMContext *context,
 
   c = gdk_keyval_to_unicode (keyval);
 
-  if (c)
+  if (c && !g_unichar_iscntrl(c))
     {
       _gtk_im_context_ime_commit_unichar (context_ime, c);
       retval = TRUE;


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