mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
Clear update region before WM_NCDESTROY.
This commit is contained in:
parent
34bf815822
commit
7c2f0fe45d
@ -431,6 +431,23 @@ static WND* WIN_DestroyWindow( WND* wndPtr )
|
||||
WIN_ReleaseWndPtr(pWnd);
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear the update region to make sure no WM_PAINT messages will be
|
||||
* generated for this window while processing the WM_NCDESTROY.
|
||||
*/
|
||||
if ((wndPtr->hrgnUpdate) || (wndPtr->flags & WIN_INTERNAL_PAINT))
|
||||
{
|
||||
if (wndPtr->hrgnUpdate > 1)
|
||||
DeleteObject( wndPtr->hrgnUpdate );
|
||||
|
||||
QUEUE_DecPaintCount( wndPtr->hmemTaskQ );
|
||||
|
||||
wndPtr->hrgnUpdate = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send the WM_NCDESTROY to the window being destroyed.
|
||||
*/
|
||||
SendMessageA( wndPtr->hwndSelf, WM_NCDESTROY, 0, 0);
|
||||
|
||||
/* FIXME: do we need to fake QS_MOUSEMOVE wakebit? */
|
||||
@ -445,12 +462,6 @@ static WND* WIN_DestroyWindow( WND* wndPtr )
|
||||
|
||||
wndPtr->dwMagic = 0; /* Mark it as invalid */
|
||||
|
||||
if ((wndPtr->hrgnUpdate) || (wndPtr->flags & WIN_INTERNAL_PAINT))
|
||||
{
|
||||
if (wndPtr->hrgnUpdate > 1) DeleteObject( wndPtr->hrgnUpdate );
|
||||
QUEUE_DecPaintCount( wndPtr->hmemTaskQ );
|
||||
}
|
||||
|
||||
/* toss stale messages from the queue */
|
||||
|
||||
if( wndPtr->hmemTaskQ )
|
||||
|
Loading…
Reference in New Issue
Block a user