In initial dibsection creation, the dibsection should always be in

appmod because the app memory is initialized to zero if no
offset/section is specified, while the DIBitmap is not.
This commit is contained in:
David Hammerton 2002-05-04 18:32:48 +00:00 committed by Alexandre Julliard
parent a38f2d9fbd
commit 7e15e5d5c3
1 changed files with 2 additions and 10 deletions

View File

@ -5793,16 +5793,8 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
InitializeCriticalSection(&(dib->lock));
if (VIRTUAL_SetFaultHandler(bm.bmBits, X11DRV_DIB_FaultHandler, (LPVOID)res))
{
if (section || offset)
{
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
if (dib) dib->status = DIB_Status_AppMod;
}
else
{
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READONLY );
if (dib) dib->status = DIB_Status_InSync;
}
X11DRV_DIB_DoProtectDIBSection( bmp, PAGE_READWRITE );
if (dib) dib->status = DIB_Status_AppMod;
}
}