From def350e3c8b6a03e60cc661fbd5f83749e517458 Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Sat, 4 Aug 2007 17:39:45 +0000 Subject: [PATCH] Moved activateIgnoringOtherApps: hack from [MMWindowController openWindow] to [MMAppController applicationDidFinishLaunching:]. git-svn-id: http://macvim.googlecode.com/svn/trunk@77 96c4425d-ca35-0410-94e5-3396d5c13a8f --- MMAppController.m | 9 +++++++++ MMWindowController.m | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/MMAppController.m b/MMAppController.m index ecfcfa2be6..05a1b98ba3 100644 --- a/MMAppController.m +++ b/MMAppController.m @@ -110,6 +110,15 @@ NSString *MMTerminateAfterLastWindowClosed = @"terminateafterlastwindowclosed"; [super dealloc]; } +- (void)applicationDidFinishLaunching:(NSNotification *)notification +{ + // HACK! The GUI does not get activated if Vim is launched by MMBackend in + // checkin:. I have not been able to figure out any other way to get it to + // activate other than forcing it here. A better solution for launching + // the GUI would be good. + [NSApp activateIgnoringOtherApps:YES]; +} + - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender { // NOTE! This way it possible to start the app with the command-line diff --git a/MMWindowController.m b/MMWindowController.m index dedcf05f1f..9b2f3f14cd 100644 --- a/MMWindowController.m +++ b/MMWindowController.m @@ -203,12 +203,6 @@ NSMutableArray *buildMenuAddress(NSMenu *menu) [self updateResizeIncrements]; [self resizeWindowToFit:self]; - // HACK! The GUI does not get activated if Vim is launched by MMBackend in - // checkin:. I have not been able to figure out any other way to get it to - // activate other than forcing it here. A better solution for launching - // the GUI would be good. - [NSApp activateIgnoringOtherApps:YES]; - [[self window] makeKeyAndOrderFront:self]; BOOL statusOff = [[NSUserDefaults standardUserDefaults]