Revision: 15273
http://sourceforge.net/p/skim-app/code/15273
Author: hofman
Date: 2025-05-24 15:05:31 +0000 (Sat, 24 May 2025)
Log Message:
-----------
Use ivar, switch window earlier
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2025-05-24 14:57:53 UTC (rev
15272)
+++ trunk/SKMainWindowController_FullScreen.m 2025-05-24 15:05:31 UTC (rev
15273)
@@ -380,15 +380,19 @@
if ([self presentationNotesDocument])
[self showNotesForPresentationWindow:presentationWindow];
- BOOL isInTab = [[[self window] tabbedWindows] count] > 1;
- BOOL shouldFadeOut = NSContainsRect([presentationWindow frame], [[self
window] frame]) == NO && isInTab == NO;
-
+ BOOL isInTab = [[mainWindow tabbedWindows] count] > 1;
if (isInTab) {
- NSUInteger tabIndex = [[[self window] tabbedWindows]
indexOfObject:[self window]];
- [savedNormalSetup setObject:[[self window] tabGroup]
forKey:TABGROUP_KEY];
+ NSUInteger tabIndex = [[mainWindow tabbedWindows]
indexOfObject:mainWindow];
+ [savedNormalSetup setObject:[mainWindow tabGroup] forKey:TABGROUP_KEY];
[savedNormalSetup setObject:[NSNumber
numberWithUnsignedInteger:tabIndex] forKey:TABINDEX_KEY];
}
+ [mainWindow setDelegate:nil];
+
+ [self setWindow:presentationWindow];
+
+ BOOL shouldFadeOut = NSContainsRect([presentationWindow frame],
[mainWindow frame]) == NO && isInTab == NO;
+
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
[context setDuration:PRESENTATION_DURATION];
[context setTimingFunction:[CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
@@ -397,14 +401,12 @@
[[mainWindow animator] setAlphaValue:0.0];
}
completionHandler:^{
- if (isInTab)
- [[self window] moveTabToNewWindow:nil];
-
- [mainWindow setDelegate:nil];
- [self setWindow:presentationWindow];
// only hide the dock and menubar when the presentation window is
on the primary screen, otherwise no need to block main menu and dock
if ([NSScreen screenForWindowHasMenuBar:presentationWindow])
[NSApp
setPresentationOptions:NSApplicationPresentationHideDock |
NSApplicationPresentationHideMenuBar];
+
+ if (isInTab)
+ [mainWindow moveTabToNewWindow:nil];
[mainWindow setAnimationBehavior:NSWindowAnimationBehaviorNone];
[mainWindow orderOut:nil];
[mainWindow setAnimationBehavior:NSWindowAnimationBehaviorDefault];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit