From ea50df6bb616542f8a159ad3ea7ce031d856f712 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Sun, 9 Sep 2012 20:44:43 +0200 Subject: [PATCH] text: Don't accept new line characters in single line mode Modified Return key presses don't trigger ::activate so we would end up adding an unprintable character to a single paragraph mode pango layout which renders it as a box. https://bugzilla.gnome.org/show_bug.cgi?id=623344 --- clutter/clutter-text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 74b3d4d67..3cefa83fb 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -2074,7 +2074,7 @@ clutter_text_key_press (ClutterActor *actor, if (key_unichar == '\r') key_unichar = '\n'; - if (key_unichar == '\n' || + if ((key_unichar == '\n' && !priv->single_line_mode) || (g_unichar_validate (key_unichar) && !g_unichar_iscntrl (key_unichar))) {