Revision: 14241
          http://sourceforge.net/p/skim-app/code/14241
Author:   hofman
Date:     2024-04-24 16:01:18 +0000 (Wed, 24 Apr 2024)
Log Message:
-----------
Try to move window to selected tab when going to presentation. Don't go to 
presentation when the window or selected tab is in full screen, as this will 
fail.

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

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2024-04-24 15:36:08 UTC (rev 
14240)
+++ trunk/SKMainWindowController_FullScreen.m   2024-04-24 16:01:18 UTC (rev 
14241)
@@ -385,6 +385,15 @@
     if ([self canEnterPresentation] == NO)
         return;
     
+    if ([[[self window] tabbedWindows] count] > 1) {
+        NSWindowTabGroup *tabGroup = [[self window] tabGroup];
+        if ([tabGroup selectedWindow] != [self window]) {
+            if ((([[self window] styleMask] | [[tabGroup selectedWindow] 
styleMask]) & NSWindowStyleMaskFullScreen))
+                return;
+            [tabGroup setSelectedWindow:[self window]];
+        }
+    }
+    
     if ([self interactionMode] == SKFullScreenMode) {
         mwcFlags.wantsPresentationOrFullScreen = 1;
         [[self window] toggleFullScreen:nil];
@@ -583,7 +592,7 @@
 }
 
 - (BOOL)canEnterPresentation {
-    return mwcFlags.isSwitchingFullScreen == 0 && [[self pdfDocument] 
isLocked] == NO && [self interactionMode] != SKPresentationMode && ([[[self 
window] tabbedWindows] count] <= 1 || [[[self window] tabGroup] selectedWindow] 
== [self window]);
+    return mwcFlags.isSwitchingFullScreen == 0 && [[self pdfDocument] 
isLocked] == NO && [self interactionMode] != SKPresentationMode;
 }
 
 - (BOOL)canExitFullscreen {

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