From b9fcfff94a92aed888c6208ba36059f973d5ca49 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Wed, 14 Aug 2013 21:26:18 +0200 Subject: [PATCH] Disable automatic termination when simulation is active. This is probably a good idea anyway, but will also stop Enjoyable from being backgrounded by App Nap in 10.9. --- Classes/EnjoyableApplicationDelegate.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/EnjoyableApplicationDelegate.m b/Classes/EnjoyableApplicationDelegate.m index 76f99e0..449f6ef 100644 --- a/Classes/EnjoyableApplicationDelegate.m +++ b/Classes/EnjoyableApplicationDelegate.m @@ -112,6 +112,8 @@ - (void)eventSimulationStarted:(NSNotification *)note { self.simulatingEventsButton.state = NSOnState; statusItem.image = [NSImage imageNamed:@"Status Menu Icon"]; + [NSProcessInfo.processInfo + disableAutomaticTermination:@"Event simulation running."]; [NSWorkspace.sharedWorkspace.notificationCenter addObserver:self selector:@selector(didSwitchApplication:) @@ -122,6 +124,8 @@ - (void)eventSimulationStopped:(NSNotification *)note { self.simulatingEventsButton.state = NSOffState; statusItem.image = [NSImage imageNamed:@"Status Menu Icon Disabled"]; + [NSProcessInfo.processInfo + enableAutomaticTermination:@"Event simulation running."]; [NSWorkspace.sharedWorkspace.notificationCenter removeObserver:self name:NSWorkspaceDidActivateApplicationNotification -- 2.30.2