Maybe rush condition?

This commit is contained in:
andreja6
2019-11-06 10:49:16 -08:00
parent 559dfea041
commit a4ef9bbad1

View File

@@ -56,15 +56,16 @@ PartInstance* Application::makePart()
void Application::setFocus(bool focus) void Application::setFocus(bool focus)
{ {
if(focus) if(_propWindow->_hwndProp != NULL)
{ if(focus)
ShowWindow(_propWindow->_hwndProp, SW_SHOW); {
SetWindowPos(_propWindow->_hwndProp, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); ShowWindow(_propWindow->_hwndProp, SW_SHOW);
} SetWindowPos(_propWindow->_hwndProp, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
else }
{ else
SetWindowPos(_propWindow->_hwndProp, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); {
} SetWindowPos(_propWindow->_hwndProp, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
} }
Application::Application(HWND parentWindow) { //: GApp(settings,window) { Application::Application(HWND parentWindow) { //: GApp(settings,window) {