diff options
Diffstat (limited to 'devices/gdevx.c')
-rw-r--r-- | devices/gdevx.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/devices/gdevx.c b/devices/gdevx.c index cfde7543f..d439ca6de 100644 --- a/devices/gdevx.c +++ b/devices/gdevx.c @@ -36,8 +36,6 @@ /****** THIS IS USELESS. XGetImage DOES NOT GENERATE EXPOSURE EVENTS. ******/ #define GET_IMAGE_EXPOSURES 0 -/* GC descriptors */ -private_st_device_X(); /* Forward references */ static int x_copy_image(gx_device_X * xdev, const byte * base, int sourcex, @@ -240,6 +238,23 @@ const gx_device_X this_device = { \ } \ }; +static void +x_finalize(const gs_memory_t *cmem, void *vpdev) +{ + /* Do an actual close of the window. */ + gx_device_X *xdev = (gx_device_X *)vpdev; + + if (xdev->dpy) { + XCloseDisplay(xdev->dpy); + xdev->dpy = NULL; + } + gx_device_finalize(cmem, vpdev); +} + +gs_public_st_suffix_add1_final(st_device_X, gx_device_X, + "gx_device_X", device_x_enum_ptrs, device_x_reloc_ptrs, + x_finalize, st_device_bbox, buffer); + x_device(gs_x11_device, std_device_color_stype_body(gx_device_X, 0, "x11", &st_device_X, FAKE_RES * DEFAULT_WIDTH_10THS / 10, |