summaryrefslogtreecommitdiffstats
path: root/graphics/gpaint/patches/22_fix_not_printable_string.patch
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/gpaint/patches/22_fix_not_printable_string.patch')
-rw-r--r--graphics/gpaint/patches/22_fix_not_printable_string.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/graphics/gpaint/patches/22_fix_not_printable_string.patch b/graphics/gpaint/patches/22_fix_not_printable_string.patch
new file mode 100644
index 0000000000..6e2b98734f
--- /dev/null
+++ b/graphics/gpaint/patches/22_fix_not_printable_string.patch
@@ -0,0 +1,21 @@
+Author: Ying-Chun Liu (PaulLiu) <grandpaul@gmail.com>
+Description: Ignore non-printable characters on text input
+Bug-Debian: http://bugs.debian.org/535217
+Bug-Ubuntu: https://bugs.edge.launchpad.net/ubuntu/+source/gpaint/+bug/262648
+Bug: https://savannah.gnu.org/bugs/?26923
+Forwarded: https://savannah.gnu.org/patch/?7051
+
+Index: b/src/text.c
+===================================================================
+--- a/src/text.c 2009-12-19 17:12:11.000000000 -0200
++++ b/src/text.c 2009-12-19 17:12:11.000000000 -0200
+@@ -238,7 +238,9 @@
+ }
+ else if (keyevent->string)
+ {
++ if (isprint(keyevent->string[0])) {
+ g_string_append(text->textbuf, keyevent->string);
++ }
+ }
+ else if ((keyevent->keyval >= GDK_space) && (keyevent->keyval < GDK_Shift_L))
+ {