Route native close through platform services

This commit is contained in:
2026-06-03 04:36:10 +02:00
parent 537f0dcb2f
commit 22006eaf47
10 changed files with 47 additions and 19 deletions

View File

@@ -27,7 +27,6 @@ bool async_lock_try();
void async_lock();
void win32_async_swap();
void async_unlock();
void destroy_window();
void win32_renderdoc_frame_start();
void win32_renderdoc_frame_end();
#elif __LINUX__
@@ -273,16 +272,7 @@ bool App::request_close()
m->m_message->set_text("Do you want to close without saving?");
m->btn_ok->m_text->set_text("Yes");
m->btn_ok->on_click = [this](Node*) {
#ifdef _WIN32
destroy_window();
//PostQuitMessage(0);
#elif __OSX__
dispatch_async(dispatch_get_main_queue(), ^{
[osx_view close];
});
#elif __LINUX__
glfwSetWindowShouldClose(glfw_window, GLFW_TRUE);
#endif
request_app_close();
Canvas::I->m_unsaved = false;
};
m->btn_cancel->m_text->set_text("No");