summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-03-22 21:31:10 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-03-22 21:31:10 +0000
commit16aa9c196416f6bbb60e22f06f62cae8ab4b0196 (patch)
treefa112252cd622b7ca926ae704d7fce65359b76af /gdk/x11
parentac05ab301ddc3590ca55b7dec8c2ac472cedc55d (diff)
downloadgdk-pixbuf-16aa9c196416f6bbb60e22f06f62cae8ab4b0196.tar.gz
fixes to locale checks
Sun Mar 22 16:25:46 1998 Owen Taylor <owt1@cornell.edu> * gtk/gtkmain.c (gtk_init): fixes to locale checks * gtk/testgtk.c (create_dnd): Create the dnd icons separately to avoid strange interactions with shapes demo. * gtk/gtkentry.[ch]: - Limit the length of the text to 2048 to prevent long delays - Fix problems with buffer overruns - Draw only the onscreen portion of the text to prevent wrapping of shorts in the X drawing code. - Keep track of character positions and x-offsets to speed up algorithms.
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkmain-x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index 936787fa0..14ebfa4e9 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -3842,6 +3842,9 @@ _g_mbtowc (wchar_t *wstr, const char *str, size_t len)
wcs[0] = (wchar_t) NULL;
mbs[0] = '\0';
+ /* The last argument isn't a mistake. The X locale code trims
+ * the input string to the length of the output string!
+ */
len = _Xmbstowcs (wcs, str, (len<MB_CUR_MAX)? len:MB_CUR_MAX);
if (len < 1)
return len;