diff options
author | L Peter Deutsch <lpd@ghostscript.com> | 2000-03-10 06:56:27 +0000 |
---|---|---|
committer | L Peter Deutsch <lpd@ghostscript.com> | 2000-03-10 06:56:27 +0000 |
commit | 5359817528ad05552e1878ab836de1a63c7368d9 (patch) | |
tree | 656881a3e3e2c0045aa75dee61f2650964a3a624 /gs/src/gdevx.c | |
parent | f81fe3af964cce59c479903f4468eb4d6d15cca9 (diff) | |
download | ghostpdl-5359817528ad05552e1878ab836de1a63c7368d9.tar.gz |
Fix: When operating in buffered mode (MaxBitmap > 0), the X driver sometimes
failed to copy all of the updated area to the screen.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@42 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gdevx.c')
-rw-r--r-- | gs/src/gdevx.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gs/src/gdevx.c b/gs/src/gdevx.c index 5b41391a0..8f35de9e0 100644 --- a/gs/src/gdevx.c +++ b/gs/src/gdevx.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. +/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. This file is part of Aladdin Ghostscript. @@ -127,6 +127,7 @@ const gx_device_X gs_x11_device = { x_get_bits_rectangle }, gx_device_bbox_common_initial(0 /*false*/, 1 /*true*/, 1 /*true*/), + 0 /*false*/, /* is_buffered */ 1 /*true*/, /* IsPageDevice */ 0, /* MaxBitmap */ NULL, /* buffer */ @@ -1020,11 +1021,18 @@ update_do_flush(gx_device_X * xdev) fit_fill_xywh(xdev, x, y, w, h); if (w > 0 && h > 0) { - if (IS_BUFFERED(xdev)) { + if (xdev->is_buffered) { /* Copy from memory image to X server. */ const gx_device_memory *mdev = (const gx_device_memory *)xdev->target; + /* + * The bbox device may have set the target to NULL + * temporarily. If this is the case, defer the screen + * update. + */ + if (mdev == NULL) + return; /* don't reset */ x_copy_image(xdev, mdev->line_ptrs[y], x, mdev->raster, x, y, w, h); } |