From 713d3b3d57c394bd0e5e5c602ee5e19bbfbbe152 Mon Sep 17 00:00:00 2001 From: Syl Morrison <38221014+MeijisIrlnd@users.noreply.github.com> Date: Sat, 17 Aug 2024 19:40:18 +0100 Subject: [PATCH] close app if window closed, macOS standalone (#292) --- src/detail/standalone/macos/AppDelegate.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/detail/standalone/macos/AppDelegate.mm b/src/detail/standalone/macos/AppDelegate.mm index db8260cd..d1040c69 100644 --- a/src/detail/standalone/macos/AppDelegate.mm +++ b/src/detail/standalone/macos/AppDelegate.mm @@ -145,6 +145,11 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification freeaudio::clap_wrapper::standalone::mainStartAudio(); } +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender +{ + return true; +} + - (void)applicationWillTerminate:(NSNotification *)aNotification { LOG << "applicationWillTerminate shutdown" << std::endl;