5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-08 12:19:18 +08:00

[windows] Fix application shutdown

This commit is contained in:
Lea Anthony 2021-06-21 14:44:07 +10:00
parent c53d44b3ec
commit d06f563bfe

View File

@ -140,7 +140,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
switch(msg) {
case WM_DESTROY: {
DestroyApplication(app);
PostQuitMessage(0);
break;
}
case WM_SIZE: {
@ -551,9 +551,6 @@ void Run(struct Application* app, int argc, char **argv) {
}
}
void DestroyApplication(struct Application* app) {
PostQuitMessage(0);
}
void SetDebug(struct Application* app, int flag) {
debug = flag;
}
@ -714,7 +711,9 @@ void SetPosition(struct Application* app, int x, int y) {
}
void Quit(struct Application* app) {
DestroyWindow(app->window);
ON_MAIN_THREAD(
DestroyWindow(app->window);
);
}