aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowControllerDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPWindowControllerDelegate.m')
-rw-r--r--Source/SPWindowControllerDelegate.m23
1 files changed, 21 insertions, 2 deletions
diff --git a/Source/SPWindowControllerDelegate.m b/Source/SPWindowControllerDelegate.m
index b4be90b5..ef52d4ef 100644
--- a/Source/SPWindowControllerDelegate.m
+++ b/Source/SPWindowControllerDelegate.m
@@ -42,6 +42,7 @@
@interface SPWindowController (SPDeclaredAPI)
- (void)_updateProgressIndicatorForItem:(NSTabViewItem *)theItem;
+- (void)_updateLineHidingViewState;
@end
@@ -113,6 +114,7 @@
*/
- (void)windowDidResignKey:(NSNotification *)notification
{
+
// Disable the "Close tab" menu item
[closeTabMenuItem setEnabled:NO];
[closeTabMenuItem setKeyEquivalent:@""];
@@ -123,6 +125,21 @@
}
/**
+ * Observe changes in main window status to update drawing state to match
+ */
+- (void)windowDidBecomeMain:(NSNotification *)notification
+{
+ [self _updateLineHidingViewState];
+}
+- (void)windowDidResignMain:(NSNotification *)notification
+{
+ [self _updateLineHidingViewState];
+
+ // Update the state again after a short delay to catch attached sheets being main
+ [self performSelector:@selector(_updateLineHidingViewState) withObject:nil afterDelay:0.1];
+}
+
+/**
* If the window is resized, notify all the tabs.
*/
- (void)windowDidResize:(NSNotification *)notification
@@ -141,6 +158,7 @@
- (void)windowWillEnterFullScreen:(NSNotification *)notification
{
[selectedTableDocument updateTitlebarStatusVisibilityForcingHide:YES];
+ [self _updateLineHidingViewState];
}
/**
@@ -149,6 +167,7 @@
- (void)windowDidExitFullScreen:(NSNotification *)notification
{
[selectedTableDocument updateTitlebarStatusVisibilityForcingHide:NO];
+ [self _updateLineHidingViewState];
}
#pragma mark -
@@ -171,9 +190,9 @@
selectedTableDocument = [tabViewItem identifier];
[selectedTableDocument didBecomeActiveTabInWindow];
-
+
if ([[self window] isKeyWindow]) [selectedTableDocument tabDidBecomeKey];
-
+
[self updateAllTabTitles:self];
}