From f94b9ba3aeb2fc3803fe96bd748aab510f82f56a Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 18 Oct 2006 12:04:13 +0000 Subject: Lower the pixmap size limit used by SuckGlyphsFromServer to accomodate XFree86. Now the limit is 4096. --- generic/Image.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'generic/Image.c') diff --git a/generic/Image.c b/generic/Image.c index f0ab878..e29ca44 100644 --- a/generic/Image.c +++ b/generic/Image.c @@ -1268,10 +1268,10 @@ SuckGlyphsFromServer(ZnWInfo *wi, maxSpanLength = (txf->max_char_width + 7) / 8; /* Be careful determining the width of the pixmap; the X protocol allows pixmaps of width 2^16-1 (unsigned short size) but drawing coordinates - max out at 2^15-1 (signed short size). If the width is too large, we - need to limit the glyphs per grab. */ - if ((glyphsPerGrab * 8 * maxSpanLength) >= (1 << 15)) { - glyphsPerGrab = (1 << 15) / (8 * maxSpanLength); + max out at 2^15-1 (signed short size). Some problems have been encountered + with XFree86, it is safe to limit the width to 4096. */ + if ((glyphsPerGrab * 8 * maxSpanLength) >= (1 << 12)) { + glyphsPerGrab = (1 << 12) / (8 * maxSpanLength); } pixwidth = glyphsPerGrab * 8 * maxSpanLength; offscreen = Tk_GetPixmap(wi->dpy, RootWindowOfScreen(wi->screen), -- cgit v1.1