Revision: 16667
          http://sourceforge.net/p/skim-app/code/16667
Author:   hofman
Date:     2026-10-17 21:20:34 +0000 (Sat, 17 Oct 2026)
Log Message:
-----------
property of screen rather than class method

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

Modified: trunk/NSScreen_SKExtensions.h
===================================================================
--- trunk/NSScreen_SKExtensions.h       2026-10-17 21:09:24 UTC (rev 16666)
+++ trunk/NSScreen_SKExtensions.h       2026-10-17 21:20:34 UTC (rev 16667)
@@ -44,7 +44,7 @@
 
 + (NSScreen *)screenForPoint:(NSPoint)point;
 
-+ (BOOL)screenForWindowHasMenuBar:(NSWindow *)window;
+@property (nonatomic, readonly) BOOL hasMenuBar;
 
 @property (nonatomic, readonly) NSScreen *primaryScreen;
 

Modified: trunk/NSScreen_SKExtensions.m
===================================================================
--- trunk/NSScreen_SKExtensions.m       2026-10-17 21:09:24 UTC (rev 16666)
+++ trunk/NSScreen_SKExtensions.m       2026-10-17 21:20:34 UTC (rev 16667)
@@ -80,10 +80,14 @@
     return screen;
 }
 
-+ (BOOL)screenForWindowHasMenuBar:(NSWindow *)window {
-    if ([self screensHaveSeparateSpaces])
+- (BOOL)hasMenuBar {
+    if ([NSScreen screensHaveSeparateSpaces])
         return YES;
-    return [[window screen] isEqual:[[self screens] firstObject]];
+    NSArray *screens = [NSScreen screens];
+    if ([screens count] == 1)
+        return YES;
+    NSScreen *screen = [screens firstObject];
+    return [self isEqual:screen] || [[self primaryScreen] isEqual:[screen 
primaryScreen]];
 }
 
 - (NSScreen *)primaryScreen {

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2026-10-17 21:09:24 UTC (rev 
16666)
+++ trunk/SKMainWindowController_FullScreen.m   2026-10-17 21:20:34 UTC (rev 
16667)
@@ -304,7 +304,7 @@
         }
         completionHandler:^{
             // only hide the dock and menubar when the presentation window is 
on the primary screen, otherwise no need to block main menu and dock
-            if ([NSScreen screenForWindowHasMenuBar:presentationWindow])
+            if ([[presentationWindow screen] hasMenuBar])
                 [NSApp 
setPresentationOptions:NSApplicationPresentationHideDock | 
NSApplicationPresentationHideMenuBar];
             
             [normalWindow orderOutWithoutAnimation];

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