If the dibsection is based on a file-mapping object, then make sure
that the section is in sync when the dibsection is deleted.
This commit is contained in:
parent
3e4813214b
commit
4cf9dd3d47
@ -419,11 +419,11 @@ BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap )
|
|||||||
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||||
if (bmp)
|
if (bmp)
|
||||||
{
|
{
|
||||||
|
if (bmp->dib) X11DRV_DIB_DeleteDIBSection( bmp );
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
if (bmp->physBitmap) XFreePixmap( gdi_display, (Pixmap)bmp->physBitmap );
|
if (bmp->physBitmap) XFreePixmap( gdi_display, (Pixmap)bmp->physBitmap );
|
||||||
bmp->physBitmap = NULL;
|
bmp->physBitmap = NULL;
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
if (bmp->dib) X11DRV_DIB_DeleteDIBSection( bmp );
|
|
||||||
GDI_ReleaseObj( hbitmap );
|
GDI_ReleaseObj( hbitmap );
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -4884,6 +4884,9 @@ void X11DRV_DIB_DeleteDIBSection(BITMAPOBJ *bmp)
|
|||||||
{
|
{
|
||||||
X11DRV_DIBSECTION *dib = (X11DRV_DIBSECTION *) bmp->dib;
|
X11DRV_DIBSECTION *dib = (X11DRV_DIBSECTION *) bmp->dib;
|
||||||
|
|
||||||
|
if (dib->dibSection.dshSection)
|
||||||
|
X11DRV_DIB_Coerce(bmp, DIB_Status_InSync, FALSE);
|
||||||
|
|
||||||
if (dib->image)
|
if (dib->image)
|
||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user