Revision: 15275 http://sourceforge.net/p/skim-app/code/15275 Author: hofman Date: 2025-05-24 15:50:56 +0000 (Sat, 24 May 2025) Log Message: ----------- set delegate and start activity before animation
Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-24 15:27:03 UTC (rev 15274) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-24 15:50:56 UTC (rev 15275) @@ -352,6 +352,12 @@ [self setWindow:presentationWindow]; + [presentationWindow setDelegate:self]; + + // prevent sleep + if (activity == nil) + activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated | NSActivityIdleDisplaySleepDisabled | NSActivityIdleSystemSleepDisabled reason:@"Presentation"]; + BOOL shouldFadeOut = NSContainsRect([presentationWindow frame], [mainWindow frame]) == NO && isInTab == NO; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { @@ -372,25 +378,18 @@ [mainWindow orderOut:nil]; [mainWindow setAnimationBehavior:NSWindowAnimationBehaviorDefault]; [mainWindow setAlphaValue:1.0]; + if ([self hasOverview]) + [self hideOverviewAnimating:NO]; + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey]) [presentationWindow setLevel:NSNormalWindowLevel]; [presentationWindow makeKeyAndOrderFront:nil]; [NSApp addWindowsItem:presentationWindow title:[self windowTitleForDocumentDisplayName:[[self document] displayName]] filename:NO]; - - if ([self hasOverview]) - [self hideOverviewAnimating:NO]; - if ([[NSUserDefaults standardUserDefaults] boolForKey:SKResizablePresentationKey]) { [presentationWindow setStyleMask:[presentationWindow styleMask] | NSWindowStyleMaskResizable]; [presentationWindow setHasShadow:YES]; } - // prevent sleep - if (activity == nil) - activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated | NSActivityIdleDisplaySleepDisabled | NSActivityIdleSystemSleepDisabled reason:@"Presentation"]; - - [presentationWindow setDelegate:self]; - [presentationView didOpen]; [touchBarController interactionModeChanged]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit