Revision: 13406
          http://sourceforge.net/p/skim-app/code/13406
Author:   hofman
Date:     2023-03-30 14:37:13 +0000 (Thu, 30 Mar 2023)
Log Message:
-----------
fullscreen window can animate from split view, which does not cover full screen

Modified Paths:
--------------
    trunk/SKMainWindowController_FullScreen.m

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2023-03-26 14:21:00 UTC (rev 
13405)
+++ trunk/SKMainWindowController_FullScreen.m   2023-03-30 14:37:13 UTC (rev 
13406)
@@ -734,10 +734,14 @@
         setAlphaValueOfTitleBarControls(window, 1.0, NO);
         [window setFrame:frame display:YES];
         [window setLevel:NSNormalWindowLevel];
-        [window setAlphaValue:1.0];
+        BOOL covered = NSContainsRect([animationWindow frame], [window frame]);
+        if (covered)
+            [window setAlphaValue:1.0];
         [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
                 [context setDuration:duration];
                 [context setTimingFunction:[CAMediaTimingFunction 
functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
+                if (covered == NO)
+                    [[window animator] setAlphaValue:1.0];
                 [[animationWindow animator] setAlphaValue:0.0];
             }
             completionHandler:^{
@@ -745,10 +749,12 @@
                 SKDESTROY(animationWindow);
             }];
     } else {
+        NSRect startFrame = [window frame];
+        startFrame.size.height = NSHeight([[window screen] frame]) + 
fullScreenOffset(window);
         [window setStyleMask:[window styleMask] & 
~NSWindowStyleMaskFullScreen];
         setAlphaValueOfTitleBarControls(window, 0.0, NO);
         [(SKMainWindow *)window setDisableConstrainedFrame:YES];
-        [window setFrame:SKShrinkRect([[window screen] frame], 
-fullScreenOffset(window), NSMaxYEdge) display:YES];
+        [window setFrame:startFrame display:YES];
         [window setLevel:NSStatusWindowLevel];
         [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
                 [context setDuration:duration];

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

Reply via email to