Revision: 14209
          http://sourceforge.net/p/skim-app/code/14209
Author:   hofman
Date:     2024-04-12 09:14:02 +0000 (Fri, 12 Apr 2024)
Log Message:
-----------
Enter full screen from presentation after exit animation has finished

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

Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h      2024-04-11 16:04:59 UTC (rev 14208)
+++ trunk/SKMainWindowController.h      2024-04-12 09:14:02 UTC (rev 14209)
@@ -197,7 +197,7 @@
         unsigned int isEditingTable:1;
         unsigned int isSwitchingFullScreen:1;
         unsigned int isAnimatingFindBar:1;
-        unsigned int wantsPresentation:1;
+        unsigned int wantsPresentationOrFullScreen:1;
         unsigned int recentInfoNeedsUpdate:1;
         unsigned int hasCropped:1;
         unsigned int fullSizeContent:1;

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2024-04-11 16:04:59 UTC (rev 
14208)
+++ trunk/SKMainWindowController_FullScreen.m   2024-04-12 09:14:02 UTC (rev 
14209)
@@ -371,9 +371,12 @@
 
 - (void)enterFullscreen {
     if ([self canEnterFullscreen]) {
-        if ([self interactionMode] == SKPresentationMode)
+        if ([self interactionMode] == SKPresentationMode) {
+            mwcFlags.wantsPresentationOrFullScreen = 1;
             [self exitPresentation];
-        [[self window] toggleFullScreen:nil];
+        } else {
+            [[self window] toggleFullScreen:nil];
+        }
     }
 }
 
@@ -387,7 +390,7 @@
         return;
     
     if ([self interactionMode] == SKFullScreenMode) {
-        mwcFlags.wantsPresentation = 1;
+        mwcFlags.wantsPresentationOrFullScreen = 1;
         [[self window] toggleFullScreen:nil];
         return;
     }
@@ -554,6 +557,8 @@
                 [[presentationPreview window] 
setAnimationBehavior:NSWindowAnimationBehaviorNone];
                 [presentationPreview close];
             }
+            if (mwcFlags.wantsPresentationOrFullScreen)
+                [self enterFullscreen];
         }];
     
     // the page number may have changed
@@ -796,8 +801,8 @@
     if ([[pdfView document] isLocked] == NO || [savedNormalSetup count] == 1)
         [savedNormalSetup removeAllObjects];
     mwcFlags.isSwitchingFullScreen = 0;
-    if (mwcFlags.wantsPresentation) {
-        mwcFlags.wantsPresentation = 0;
+    if (mwcFlags.wantsPresentationOrFullScreen) {
+        mwcFlags.wantsPresentationOrFullScreen = 0;
         // make sure the window fully finishes full screen
         // calling this immediately can crash when -moveTabToNewWindow: is 
called
         dispatch_async(dispatch_get_main_queue(), ^{ [self enterPresentation]; 
});
@@ -819,7 +824,7 @@
     }
     animationWindow = nil;
     mwcFlags.isSwitchingFullScreen = 0;
-    mwcFlags.wantsPresentation = 0;
+    mwcFlags.wantsPresentationOrFullScreen = 0;
 }
 
 #pragma mark Presentation Notes Navigation

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