Revision: 14232
          http://sourceforge.net/p/skim-app/code/14232
Author:   hofman
Date:     2024-04-23 14:39:21 +0000 (Tue, 23 Apr 2024)
Log Message:
-----------
Change collection behavior of mainWindow to move to active space when exiting 
presentation, adding a child window trick does not work anymore.

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

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2024-04-22 16:45:48 UTC (rev 
14231)
+++ trunk/SKMainWindowController_FullScreen.m   2024-04-23 14:39:21 UTC (rev 
14232)
@@ -281,11 +281,9 @@
     if (NSPointInRect(SKCenterPoint([mainWindow frame]), [[presentationWindow 
screen] frame])) {
         NSWindowCollectionBehavior collectionBehavior = [mainWindow 
collectionBehavior];
         // trick to make sure the main window shows up in the same space as 
the fullscreen window
-        [presentationWindow addChildWindow:mainWindow ordered:NSWindowBelow];
-        [presentationWindow removeChildWindow:mainWindow];
-        // these can change due to the child window trick
-        [mainWindow setLevel:NSNormalWindowLevel];
-        [mainWindow setCollectionBehavior:collectionBehavior];
+        [mainWindow setCollectionBehavior:collectionBehavior | 
NSWindowCollectionBehaviorMoveToActiveSpace];
+        [mainWindow makeKeyAndOrderFront:nil];
+        dispatch_async(dispatch_get_main_queue(), ^{ [mainWindow 
setCollectionBehavior:collectionBehavior]; });
     } else {
         [mainWindow makeKeyAndOrderFront:nil];
     }

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