Skip to content
Snippets Groups Projects
Commit 757fbf6a authored by George Nachman's avatar George Nachman
Browse files

Fix bug where clicking in another iterm window while visor is opened restored previous app.

parent e733f6fe
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -51,6 +51,7 @@
#import "GTMCarbonEvent.h"
#import "iTerm.h"
 
#define HOTKEY_WINDOW_VERBOSE_LOGGING
#ifdef HOTKEY_WINDOW_VERBOSE_LOGGING
#define HKWLog NSLog
#else
Loading
Loading
@@ -1031,6 +1032,7 @@ static BOOL IsSnowLeopardOrLater() {
[inv getReturnValue:&app];
 
if (app) {
NSLog(@"Restore app %@", app);
//[app activateWithOptions:0];
sig = [[app class] instanceMethodSignatureForSelector:@selector(activateWithOptions:)];
assert(sig);
Loading
Loading
@@ -1402,7 +1404,12 @@ static void RollOutHotkeyTerm(PseudoTerminal* term, BOOL itermWasActiveWhenHotke
- (void)hideHotKeyWindow:(PseudoTerminal*)hotkeyTerm
{
HKWLog(@"Hide visor.");
[self restorePreviouslyActiveApp];
if ([[hotkeyTerm window] isVisible]) {
HKWLog(@"key window is %@", [NSApp keyWindow]);
if ([NSApp keyWindow] == nil) {
[self restorePreviouslyActiveApp];
}
}
RollOutHotkeyTerm(hotkeyTerm, itermWasActiveWhenHotkeyOpened);
}
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment