wine/dlls/x11drv graphics.c

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 28 05:06:40 CST 2005


ChangeSet ID:	21492
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/28 05:06:40

Modified files:
	dlls/x11drv    : graphics.c 

Log message:
	Rein Klazes <wijn at wanadoo.nl>
	Handle an X error in X11DRV_ExtFloodFill().

Patch: http://cvs.winehq.org/patch.py?id=21492

Old revision  New revision  Changes     Path
 1.8           1.9           +7 -0       wine/dlls/x11drv/graphics.c

Index: wine/dlls/x11drv/graphics.c
diff -u -p wine/dlls/x11drv/graphics.c:1.8 wine/dlls/x11drv/graphics.c:1.9
--- wine/dlls/x11drv/graphics.c:1.8	28 Nov 2005 11: 6:40 -0000
+++ wine/dlls/x11drv/graphics.c	28 Nov 2005 11: 6:40 -0000
@@ -1272,6 +1272,11 @@ static void X11DRV_InternalFloodFill(XIm
 }
 
 
+static int ExtFloodFillXGetImageErrorHandler( Display *dpy, XErrorEvent *event, void *arg )
+{
+    return (event->request_code == X_GetImage && event->error_code == BadMatch);
+}
+
 /**********************************************************************
  *          X11DRV_ExtFloodFill
  */
@@ -1292,10 +1297,12 @@ X11DRV_ExtFloodFill( X11DRV_PDEVICE *phy
     GetRgnBox( physDev->region, &rect );
 
     wine_tsx11_lock();
+    X11DRV_expect_error( gdi_display, ExtFloodFillXGetImageErrorHandler, NULL );
     image = XGetImage( gdi_display, physDev->drawable,
                        physDev->org.x + rect.left, physDev->org.y + rect.top,
                        rect.right - rect.left, rect.bottom - rect.top,
                        AllPlanes, ZPixmap );
+    if(X11DRV_check_error()) image = NULL;
     wine_tsx11_unlock();
     if (!image) return FALSE;
 



More information about the wine-cvs mailing list