When window class has CS_CLASSDC style we should not remove the DC
when destroying the window.
This commit is contained in:
parent
bb558b7a1a
commit
f0b27edfdc
|
@ -158,20 +158,23 @@ void DCE_FreeWindowDCE( WND* pWnd )
|
|||
{
|
||||
if( pDCE->hwndCurrent == pWnd->hwndSelf )
|
||||
{
|
||||
if( pDCE == pWnd->dce ) /* owned DCE */
|
||||
if( pDCE == pWnd->dce ) /* owned or Class DCE*/
|
||||
{
|
||||
pDCE = DCE_FreeDCE( pDCE );
|
||||
pWnd->dce = NULL;
|
||||
continue;
|
||||
if (pWnd->class->style & CS_OWNDC) /* owned DCE*/
|
||||
{
|
||||
pDCE = DCE_FreeDCE( pDCE );
|
||||
pWnd->dce = NULL;
|
||||
continue;
|
||||
}
|
||||
else if( pDCE->DCXflags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN) ) /* Class DCE*/
|
||||
{
|
||||
DCE_DeleteClipRgn( pDCE );
|
||||
pDCE->hwndCurrent = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!(pDCE->DCXflags & DCX_CACHE) ) /* class DCE */
|
||||
{
|
||||
if( pDCE->DCXflags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN) )
|
||||
DCE_DeleteClipRgn( pDCE );
|
||||
}
|
||||
else if( pDCE->DCXflags & DCX_DCEBUSY ) /* shared cache DCE */
|
||||
if( pDCE->DCXflags & DCX_DCEBUSY ) /* shared cache DCE */
|
||||
{
|
||||
ERR("[%04x] GetDC() without ReleaseDC()!\n",
|
||||
pWnd->hwndSelf);
|
||||
|
|
Loading…
Reference in New Issue