dib: properly sync to section
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Mon Feb 28 08:04:52 CST 2005
Huw Davies <huw at codeweavers.com>
If the dibsection is based on a file-mapping object, then make
sure that the section is in sync when the dibsection is deleted.
--
Huw Davies
huw at codeweavers.com
Index: dlls/x11drv/bitmap.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/bitmap.c,v
retrieving revision 1.7
diff -u -p -r1.7 bitmap.c
--- dlls/x11drv/bitmap.c 13 Jul 2004 03:49:52 -0000 1.7
+++ dlls/x11drv/bitmap.c 28 Feb 2005 14:00:42 -0000
@@ -419,11 +419,11 @@ BOOL X11DRV_DeleteBitmap( HBITMAP hbitma
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
if (bmp)
{
+ if (bmp->dib) X11DRV_DIB_DeleteDIBSection( bmp );
wine_tsx11_lock();
if (bmp->physBitmap) XFreePixmap( gdi_display, (Pixmap)bmp->physBitmap );
bmp->physBitmap = NULL;
wine_tsx11_unlock();
- if (bmp->dib) X11DRV_DIB_DeleteDIBSection( bmp );
GDI_ReleaseObj( hbitmap );
}
return TRUE;
Index: dlls/x11drv/dib.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/dib.c,v
retrieving revision 1.22
diff -u -p -r1.22 dib.c
--- dlls/x11drv/dib.c 23 Dec 2004 20:31:56 -0000 1.22
+++ dlls/x11drv/dib.c 28 Feb 2005 14:00:42 -0000
@@ -4884,6 +4884,9 @@ void X11DRV_DIB_DeleteDIBSection(BITMAPO
{
X11DRV_DIBSECTION *dib = (X11DRV_DIBSECTION *) bmp->dib;
+ if (dib->dibSection.dshSection)
+ X11DRV_DIB_Coerce(bmp, DIB_Status_InSync, FALSE);
+
if (dib->image)
{
wine_tsx11_lock();
More information about the wine-patches
mailing list