[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 authored and Geoffrey McRae committed 2021-07-22 18:55:11 +10:00
1 parent eb5c588af9
commit 4c60409aaf
1 file changed
+1 -1
+1 -1
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;
}