[host] windows: use WM_CLOSE to signal window destruction

DestroyWindow can only be invoked on the thread that created the window.
All other threads must use WM_CLOSE or another message to signal tell the
window to destroy itself.
This commit is contained in:
Quantum 2021-07-22 02:57:32 -04:00 committed by Geoffrey McRae
parent eb5c588af9
commit 4c60409aaf

View file

@ -257,7 +257,7 @@ static int appThread(void * opaque)
{
RegisterTrayIcon();
int result = app_main(app.argc, app.argv);
DestroyWindow(app.messageWnd);
SendMessage(app.messageWnd, WM_CLOSE, 0, 0);
return result;
}