From 84b4a15617f889e328233a1f904f4592babf5fe0 Mon Sep 17 00:00:00 2001 From: Chris Hoffman Date: Mon, 14 May 2012 07:12:54 -0500 Subject: [PATCH] Move shutdown outside of class implementation --- os/mac/iTerm2HotKey.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/os/mac/iTerm2HotKey.m b/os/mac/iTerm2HotKey.m index 1bc4cfd..403b430 100644 --- a/os/mac/iTerm2HotKey.m +++ b/os/mac/iTerm2HotKey.m @@ -18,13 +18,6 @@ +(AppListener *)sharedListener { return _shared; } -void shutdown(int signum) { - UnregisterEventHotKey(hotKeyRef); - [[[NSWorkspace sharedWorkspace] notificationCenter] - removeObserver:[AppListener sharedListener]]; - [[NSApplication sharedApplication] terminate:nil]; -} - -(void)notified:(NSNotification *)aNotification { NSRunningApplication *sender; NSString *ident; @@ -38,6 +31,13 @@ -(void)notified:(NSNotification *)aNotification { } @end +void shutdown(int signum) { + UnregisterEventHotKey(hotKeyRef); + [[[NSWorkspace sharedWorkspace] notificationCenter] + removeObserver:[AppListener sharedListener]]; + [[NSApplication sharedApplication] terminate:nil]; +} + OSStatus hotkey_handler(EventHandlerCallRef next, EventRef event, void *data) { NSRunningApplication *iTerm2; NSArray *apps = [NSRunningApplication