From 4cf9dd3d473cd721c8af6512f3d1698b77fbde8b Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 1 Mar 2005 10:43:19 +0000 Subject: [PATCH] If the dibsection is based on a file-mapping object, then make sure that the section is in sync when the dibsection is deleted. --- dlls/x11drv/bitmap.c | 2 +- dlls/x11drv/dib.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/x11drv/bitmap.c b/dlls/x11drv/bitmap.c index 14c3ea1d3be..11851508050 100644 --- a/dlls/x11drv/bitmap.c +++ b/dlls/x11drv/bitmap.c @@ -419,11 +419,11 @@ BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap ) 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; diff --git a/dlls/x11drv/dib.c b/dlls/x11drv/dib.c index a510bf7b0d1..2e1c6d226fe 100644 --- a/dlls/x11drv/dib.c +++ b/dlls/x11drv/dib.c @@ -4884,6 +4884,9 @@ void X11DRV_DIB_DeleteDIBSection(BITMAPOBJ *bmp) { 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();