aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPAppController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r--Source/SPAppController.m16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index 2d719c95..c5c2ed2d 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -33,6 +33,7 @@
#import "SPConstants.h"
#import "SPWindowController.h"
+#import <PSMTabBar/PSMTabBarControl.h>
#import <Sparkle/Sparkle.h>
@implementation SPAppController
@@ -79,7 +80,10 @@
// Register SPAppController for AppleScript events
[[NSScriptExecutionContext sharedScriptExecutionContext] setTopLevelObject:self];
-
+
+ // Register for drag start notifications - used to bring all windows to front
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStarted:) name:PSMTabDragDidBeginNotification object:nil];
+
isNewFavorite = NO;
}
@@ -500,6 +504,14 @@
return nil;
}
+/**
+ * When tab drags start, bring all the windows in front of other applications.
+ */
+- (void)tabDragStarted:(id)sender
+{
+ [NSApp arrangeInFront:self];
+}
+
#pragma mark -
#pragma mark IBAction methods
@@ -920,6 +932,8 @@
*/
- (void)dealloc
{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+
if(_spfSessionDocData) [_spfSessionDocData release], _spfSessionDocData = nil;
[prefsController release], prefsController = nil;
[aboutController release], aboutController = nil;