aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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),