Skip to content

Commit

Permalink
Fixed bug with fullscreen controls being visible while SC was inactive.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Rauchfuss committed Oct 16, 2010
1 parent a90f007 commit 4402b24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Session/TSSTSessionWindowController.h
Expand Up @@ -177,6 +177,7 @@ enum PageSelectionMode {
- (void)restoreSession;
- (void)prepareToEnd;


- (void)refreshLoupePanel;
- (void)infoPanelSetupAtPoint:(NSPoint)point;

Expand All @@ -202,6 +203,8 @@ enum PageSelectionMode {
- (TSSTManagedSession *)session;
- (NSManagedObjectContext *)managedObjectContext;
- (void)toolbarWillAddItem:(NSNotification *)notification;
- (void)deactivate:(NSNotification *)notification;


/* Methods that kill page expose, the loupe, and fullscreen.
In that order. */
Expand Down
9 changes: 8 additions & 1 deletion Session/TSSTSessionWindowController.m
Expand Up @@ -166,6 +166,7 @@ - (void)awakeFromNib

[pageScrollView setPostsFrameChangedNotifications: YES];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(resizeView) name: NSViewFrameDidChangeNotification object: pageScrollView];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(deactivate:) name: NSApplicationDidResignActiveNotification object: NSApp];
[pageController addObserver: self forKeyPath: @"selectionIndex" options: 0 context: nil];
[pageController addObserver: self forKeyPath: @"arrangedObjects.@count" options: 0 context: nil];

Expand Down Expand Up @@ -359,7 +360,7 @@ - (void)mouseMoved:(NSEvent *)theEvent
[self infoPanelSetupAtPoint: windowLocation];
}
}
else if(NSMouseInRect(screenLocation, fullscreenFrame, NO))
else if(NSMouseInRect(screenLocation, fullscreenFrame, NO) && [NSApp isActive])
{
[[self window] addChildWindow: bezelWindow ordered: NSWindowAbove];
[bezelWindow makeKeyWindow];
Expand Down Expand Up @@ -1711,6 +1712,12 @@ - (void)windowDidResignKey:(NSNotification *)aNotification
}
}

- (void)deactivate:(NSNotification *)notification
{
[[bezelWindow parentWindow] removeChildWindow: bezelWindow];
[bezelWindow orderOut: self];
}



- (NSSize)windowWillResize:(NSWindow *)resizeWindow toSize:(NSSize)newSize
Expand Down

0 comments on commit 4402b24

Please sign in to comment.