diff --git a/macosx/AddMagnetWindowController.mm b/macosx/AddMagnetWindowController.mm index 01415b41a..d8a389d58 100644 --- a/macosx/AddMagnetWindowController.mm +++ b/macosx/AddMagnetWindowController.mm @@ -74,6 +74,9 @@ self.fNameField.stringValue = name; self.fNameField.toolTip = name; + //disable fullscreen support + [self.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone]; + [self setGroupsMenu]; [self.fGroupPopUp selectItemWithTag:self.fGroupValue]; diff --git a/macosx/AddWindowController.mm b/macosx/AddWindowController.mm index c0a3ddf8c..dcfbe5cb8 100644 --- a/macosx/AddWindowController.mm +++ b/macosx/AddWindowController.mm @@ -106,6 +106,9 @@ self.fNameField.stringValue = name; self.fNameField.toolTip = name; + //disable fullscreen support + [self.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone]; + self.fIconView.image = self.torrent.icon; if (!self.torrent.folder) diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 068fc44dd..de7af5a8f 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -563,6 +563,9 @@ static void removeKeRangerRansomware() self.fWindow.delegate = self; //do manually to avoid placement issue + //disable fullscreen support + [self.fWindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone]; + [self.fWindow makeFirstResponder:self.fTableView]; self.fWindow.excludedFromWindowsMenu = YES; @@ -3960,7 +3963,7 @@ static void removeKeRangerRansomware() NSUInteger const scrollMask = scrollView.autoresizingMask; scrollView.autoresizingMask = NSViewNotSizable; - NSRect frame = [self windowFrameByAddingHeight:heightChange checkLimits:NO]; + NSRect const frame = [self windowFrameByAddingHeight:heightChange checkLimits:NO]; [self.fWindow setFrame:frame display:YES animate:animate]; //re-enable autoresize @@ -5168,28 +5171,9 @@ static void removeKeRangerRansomware() return frame; } -- (void)windowWillEnterFullScreen:(NSNotification*)notification -{ - // temporarily disable AutoSize - NSSize contentMinSize = self.fWindow.contentMinSize; - contentMinSize.height = self.minWindowContentSizeAllowed; - - self.fWindow.contentMinSize = contentMinSize; - - NSSize contentMaxSize = self.fWindow.contentMaxSize; - contentMaxSize.height = FLT_MAX; - self.fWindow.contentMaxSize = contentMaxSize; -} - -- (void)windowDidExitFullScreen:(NSNotification*)notification -{ - // restore auotsize setting - [self updateForAutoSize]; -} - - (void)setWindowSizeToFit { - if ([self.fDefaults boolForKey:@"AutoSize"] && self.fWindow.isFullScreen == NO) + if ([self.fDefaults boolForKey:@"AutoSize"]) { NSScrollView* scrollView = self.fTableView.enclosingScrollView; diff --git a/macosx/CreatorWindowController.mm b/macosx/CreatorWindowController.mm index a31a91ed4..aa5e66091 100644 --- a/macosx/CreatorWindowController.mm +++ b/macosx/CreatorWindowController.mm @@ -161,6 +161,9 @@ NSMutableSet* creatorWindowControllerSet = nil; self.window.title = name; + //disable fullscreen support + [self.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone]; + self.fNameField.stringValue = name; self.fNameField.toolTip = self.fPath.path; diff --git a/macosx/MainWindow.h b/macosx/MainWindow.h index 7c70b4abd..5334cefc3 100644 --- a/macosx/MainWindow.h +++ b/macosx/MainWindow.h @@ -6,6 +6,4 @@ @interface MainWindow : NSWindow -- (BOOL)isFullScreen; - @end diff --git a/macosx/MainWindow.mm b/macosx/MainWindow.mm index 0574d9ece..6f113cbb1 100644 --- a/macosx/MainWindow.mm +++ b/macosx/MainWindow.mm @@ -29,9 +29,4 @@ [super toggleToolbarShown:sender]; } -- (BOOL)isFullScreen -{ - return (self.styleMask & NSFullScreenWindowMask); -} - @end diff --git a/macosx/MessageWindowController.mm b/macosx/MessageWindowController.mm index 5641f2411..58c0132f3 100644 --- a/macosx/MessageWindowController.mm +++ b/macosx/MessageWindowController.mm @@ -58,6 +58,9 @@ [window setFrameUsingName:@"MessageWindowFrame"]; window.restorationClass = [self class]; + //disable fullscreen support + [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone]; + [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(resizeColumn) name:NSTableViewColumnDidResizeNotification object:self.fMessageTable];