bitmap: don't own a compatible bitmap too soon

Huw D M Davies h.davies1 at physics.ox.ac.uk
Thu Nov 13 11:03:26 CST 2003


        Huw Davies <huw at codeweavers.com>
	A bitmap created by CreateCompatibleBitmap should not be owned by a
	driver until it is selected into it.  The driver checks that the
	bitmap is of the correct depth in SelectBitmap.
-- 
Huw Davies
huw at codeweavers.com
Index: objects/bitmap.c
===================================================================
RCS file: /home/wine/wine/objects/bitmap.c,v
retrieving revision 1.57
diff -u -r1.57 bitmap.c
--- objects/bitmap.c	26 Jul 2003 20:39:46 -0000	1.57
+++ objects/bitmap.c	13 Nov 2003 17:00:59 -0000
@@ -179,12 +179,6 @@
 	   hbmpRet = CreateBitmap( 1, 1, 1, 1, NULL );
 	else
 	   hbmpRet = CreateBitmap( width, height, 1, dc->bitsPerPixel, NULL );
-
-        if (!BITMAP_SetOwnerDC( hbmpRet, dc ))
-        {
-            DeleteObject( hbmpRet );
-            hbmpRet = 0;
-        }
     }
     TRACE("\t\t%p\n", hbmpRet);
     GDI_ReleaseObj(hdc);



More information about the wine-patches mailing list