mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 17:58:29 +00:00
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:
parent
e1c554bd40
commit
3dbfe2f82e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user