Revision: 14201
http://sourceforge.net/p/skim-app/code/14201
Author: hofman
Date: 2024-04-10 15:54:57 +0000 (Wed, 10 Apr 2024)
Log Message:
-----------
return nil from custom windows delegate methods rather than overriding
respondsToSelector: to use system animation for full screen transition
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2024-04-10 15:41:28 UTC (rev
14200)
+++ trunk/SKMainWindowController_FullScreen.m 2024-04-10 15:54:57 UTC (rev
14201)
@@ -642,6 +642,8 @@
- (NSArray *)customWindowsToEnterFullScreenForWindow:(NSWindow *)window {
NSArray *windows = openWindows(self);
+ if ([windows count] == 1)
+ return nil;
if ([[NSWorkspace sharedWorkspace]
accessibilityDisplayShouldReduceMotion]) {
animationWindow = [[SKAnimatedBorderlessWindow alloc]
initWithContentRect:[window frame]];
windows = [windows arrayByAddingObject:animationWindow];
@@ -733,6 +735,8 @@
- (NSArray *)customWindowsToExitFullScreenForWindow:(NSWindow *)window {
NSArray *windows = openWindows(self);
+ if ([windows count] == 1)
+ return nil;
if ([[NSWorkspace sharedWorkspace]
accessibilityDisplayShouldReduceMotion]) {
animationWindow = [[SKAnimatedBorderlessWindow alloc]
initWithContentRect:[window frame]];
windows = [windows arrayByAddingObject:animationWindow];
@@ -814,19 +818,6 @@
mwcFlags.wantsPresentation = 0;
}
-- (BOOL)respondsToSelector:(SEL)aSelector {
- if (NO == [super respondsToSelector:aSelector])
- return NO;
- else if ((aSelector == @selector(customWindowsToEnterFullScreenForWindow:)
||
- aSelector ==
@selector(window:startCustomAnimationToEnterFullScreenWithDuration:) ||
- aSelector ==
@selector(customWindowsToExitFullScreenForWindow:) ||
- aSelector ==
@selector(window:startCustomAnimationToExitFullScreenWithDuration:)) &&
- [openWindows(self) count] == 1)
- return NO;
- else
- return YES;
-}
-
#pragma mark Presentation Notes Navigation
- (NSView *)presentationNotesView {
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