aboutsummaryrefslogtreecommitdiff
path: root/generic/Image.c
diff options
context:
space:
mode:
authorlecoanet2006-10-18 12:04:13 +0000
committerlecoanet2006-10-18 12:04:13 +0000
commitf94b9ba3aeb2fc3803fe96bd748aab510f82f56a (patch)
treeb64b0221c24f99cf8ce96e3bfef48e11890f05e6 /generic/Image.c
parente369041480b01cc660041e81e07d8afbbd42e706 (diff)
downloadtkzinc-f94b9ba3aeb2fc3803fe96bd748aab510f82f56a.zip
tkzinc-f94b9ba3aeb2fc3803fe96bd748aab510f82f56a.tar.gz
tkzinc-f94b9ba3aeb2fc3803fe96bd748aab510f82f56a.tar.bz2
tkzinc-f94b9ba3aeb2fc3803fe96bd748aab510f82f56a.tar.xz
Lower the pixmap size limit used by SuckGlyphsFromServer
to accomodate XFree86. Now the limit is 4096.
Diffstat (limited to 'generic/Image.c')
-rw-r--r--generic/Image.c8
1 files changed, 4 insertions, 4 deletions
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),