From b9232b796c79cbfbc7ebdc3fb753e63c5c8c7ed1 Mon Sep 17 00:00:00 2001 From: Martin Fouilleul Date: Tue, 12 Sep 2023 09:35:22 +0200 Subject: [PATCH] Fix hang on quit. Closes #91 --- src/app/osx_app.m | 7 ------- src/runtime.c | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/app/osx_app.m b/src/app/osx_app.m index f0e24a3..6467b29 100644 --- a/src/app/osx_app.m +++ b/src/app/osx_app.m @@ -951,8 +951,6 @@ static void oc_process_mouse_button(NSEvent* nsEvent, oc_window_data* window, oc } else if([nsEvent charactersIgnoringModifiers] == [NSString stringWithUTF8String:"q"]) { - oc_appData.shouldQuit = true; - oc_event event = {}; event.type = OC_EVENT_QUIT; @@ -1147,11 +1145,6 @@ bool oc_should_quit() return (oc_appData.shouldQuit); } -void oc_do_quit() -{ - oc_appData.shouldQuit = true; -} - void oc_cancel_quit() { oc_appData.shouldQuit = false; diff --git a/src/runtime.c b/src/runtime.c index 538257c..ac7f2a0 100644 --- a/src/runtime.c +++ b/src/runtime.c @@ -579,6 +579,7 @@ i32 orca_runloop(void* user) switch(event->type) { case OC_EVENT_WINDOW_CLOSE: + case OC_EVENT_QUIT: { app->quit = true; }