From 8d7b7d830c936d97ea7ebe21234ddbb5c0de5f28 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 25 Jun 2001 19:51:04 +0000 Subject: [PATCH] Better separate the XShm using code. --- graphics/x11drv/dib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index dae4cb325a9..2c9b4ca90ec 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c @@ -34,7 +34,9 @@ DECLARE_DEBUG_CHANNEL(x11drv); static int ximageDepthTable[32]; +#ifdef HAVE_LIBXXSHM static int XShmErrorFlag = 0; +#endif /* This structure holds the arguments for DIB_SetImageBits() */ typedef struct @@ -2776,6 +2778,7 @@ static int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) descr->drawable, descr->gc, bmpImage, descr->xSrc, descr->ySrc, descr->xDest, descr->yDest, descr->width, descr->height); +#ifdef HAVE_LIBXXSHM if (descr->useShm) { XShmPutImage( gdi_display, descr->drawable, descr->gc, bmpImage, @@ -2784,6 +2787,7 @@ static int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) XSync( gdi_display, 0 ); } else +#endif XPutImage( gdi_display, descr->drawable, descr->gc, bmpImage, descr->xSrc, descr->ySrc, descr->xDest, descr->yDest, descr->width, descr->height ); @@ -3769,6 +3773,7 @@ HBITMAP16 X11DRV_DIB_CreateDIBSection16( return res; } +#ifdef HAVE_LIBXXSHM /*********************************************************************** * X11DRV_XShmErrorHandler * @@ -3783,8 +3788,6 @@ static int XShmErrorHandler(Display *dpy, XErrorEvent *event) * X11DRV_XShmCreateImage * */ - -#ifdef HAVE_LIBXXSHM static XImage *X11DRV_XShmCreateImage( int width, int height, int bpp, XShmSegmentInfo* shminfo) {