BUGFIX: Finally fixed close flashing issue.

It must be called BEFORE WM_DESTROY because WM_DESTROY is emitted 
AFTER the childs and itself have been destroyed. In the resulting, 
short time interval (after destroy and before handling WM_DESTROY)
a new flashing can occur, because the Window Messaging System
seems to give the keyboard/mouse input to the next window. But
without waiting for the WM_DESTROY to be processed. That's why
we're directly doing it in WM_CLOSE now :-)
This commit is contained in:
andre@woesten.com 2008-11-05 23:19:48 +00:00
parent e1c554bd40
commit 3dbfe2f82e

View File

@ -169,9 +169,9 @@ LRESULT TopLevelWindow::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
}
return 0;
case WM_DESTROY:
case WM_CLOSE:
{
// Destroy handler is used together with ShowModal
// Close handler is used together with ShowModal
// According to http://msdn.microsoft.com/en-us/library/ms646291.aspx
// we need to do:
// "A window must be enabled before it can be activated. For example,
@ -186,11 +186,7 @@ LRESULT TopLevelWindow::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
this->parentWindow = NULL;
}
}
break;
case WM_CLOSE:
{
this->closed = true;
}
break;