aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-08-16 00:07:03 +0000
committerrowanbeentje <rowan@beent.je>2011-08-16 00:07:03 +0000
commit22f2e47959158cf33704481353a65b6d3b242b88 (patch)
treefdccf10fefb43197065f028017e77cd83b51ab85 /Source/SPWindowController.m
parentaee5bc25beb877fb6484031c087b4f93096394eb (diff)
downloadsequelpro-22f2e47959158cf33704481353a65b6d3b242b88.tar.gz
sequelpro-22f2e47959158cf33704481353a65b6d3b242b88.tar.bz2
sequelpro-22f2e47959158cf33704481353a65b6d3b242b88.zip
- Lion compatibility improvement: add support for fullscreen windows, on the main window only; hide SSH/SSL status when entering fullscreen mode, to prevent drawing issues
- Lion compatibility improvement: update tab colours under 10.7 to match system styles - Lion compatibility improvement: fix issues dragging tabs out of windows and into other tab bars - Lion compatibility improvement: fix QuickLook issues under 10.7, including windows which couldn't be closed, fullscreened, or crashes - Fix exceptions in the bundle controller when using tab switching keys - Lion compatibility improvement: use overlay scrollers where possible
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r--Source/SPWindowController.m26
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index f4094ac3..2ef62941 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -22,6 +22,14 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
+// Forward-declare for 10.7 compatibility
+#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+enum {
+ NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7,
+ NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8
+};
+#endif
+
#import "SPWindowController.h"
#import "SPDatabaseDocument.h"
#import "PSMTabDragAssistant.h"
@@ -46,6 +54,8 @@
{
selectedTableDocument = nil;
+ [[self window] setCollectionBehavior:[[self window] collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary];
+
// Disable automatic cascading - this occurs before the size is set, so let the app
// controller apply cascading after frame autosaving.
[self setShouldCascadeWindows:NO];
@@ -701,6 +711,22 @@
}
}
+/**
+ * If the window is entering fullscreen, update the front tab's titlebar status view visibility.
+ */
+- (void)windowWillEnterFullScreen:(NSNotification *)notification
+{
+ [selectedTableDocument updateTitlebarStatusVisibilityForcingHide:YES];
+}
+
+/**
+ * If the window exits fullscreen, update the front tab's titlebar status view visibility.
+ */
+- (void)windowDidExitFullScreen:(NSNotification *)notification
+{
+ [selectedTableDocument updateTitlebarStatusVisibilityForcingHide:NO];
+}
+
#pragma mark -
#pragma mark First responder forwarding to active tab