Revision: 15305
          http://sourceforge.net/p/skim-app/code/15305
Author:   hofman
Date:     2025-05-27 09:15:16 +0000 (Tue, 27 May 2025)
Log Message:
-----------
use ivars for static window display

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

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2025-05-26 22:23:53 UTC (rev 
15304)
+++ trunk/SKMainWindowController_FullScreen.m   2025-05-27 09:15:16 UTC (rev 
15305)
@@ -472,7 +472,9 @@
     }
 }
 
-- (void)displayStaticContentForWindow:(NSWindow *)window inWindow:(NSWindow 
*)displayWindow {
+- (void)displayStaticContentForWindow {
+    NSWindow *window = [self window];
+    NSWindow *displayWindow = savedNormalWindow;
     NSRect frame = [window frame];
     CGImageRef cgImage = CGWindowListCreateImage(CGRectNull, 
kCGWindowListOptionIncludingWindow, (CGWindowID)[window windowNumber], 
kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution);
     if (([window styleMask] & NSWindowStyleMaskFullScreen) != 0 && 
autoHideToolbarInFullScreen() == NO && [[window toolbar] isVisible]) {
@@ -600,7 +602,7 @@
     if ([[NSUserDefaults standardUserDefaults] 
boolForKey:AppleMenuBarVisibleInFullscreenKey])
         frame.size.height -= [[NSApp mainMenu] menuBarHeight] ?: 24.0;
     if (savedNormalWindow != nil) {
-        [self displayStaticContentForWindow:window inWindow:savedNormalWindow];
+        [self displayStaticContentForWindow];
         [(SKMainWindow *)window setDisableConstrainedFrame:YES];
         [window setFrame:frame display:YES];
         [window orderWindow:NSWindowAbove relativeTo:savedNormalWindow];
@@ -689,12 +691,12 @@
 - (void)window:(NSWindow *)window 
startCustomAnimationToExitFullScreenWithDuration:(NSTimeInterval)duration {
     NSRect frame = NSRectFromString([savedNormalSetup 
objectForKey:MAINWINDOWFRAME_KEY]);
     if (savedNormalWindow != nil) {
-        [self displayStaticContentForWindow:window inWindow:savedNormalWindow];
+        BOOL covered = NSContainsRect([window frame], frame);
+        [self displayStaticContentForWindow];
         [window setStyleMask:[window styleMask] & 
~NSWindowStyleMaskFullScreen];
         setAlphaValueOfTitleBarControls(window, 1.0, NO);
         [window setFrame:frame display:YES];
         [window setLevel:NSNormalWindowLevel];
-        BOOL covered = NSContainsRect([savedNormalWindow frame], [window 
frame]);
         if (covered)
             [window setAlphaValue:1.0];
         [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to