Revision: 16178
          http://sourceforge.net/p/skim-app/code/16178
Author:   hofman
Date:     2026-04-06 08:43:22 +0000 (Mon, 06 Apr 2026)
Log Message:
-----------
variable for window rather than superview

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2026-04-05 22:24:03 UTC (rev 16177)
+++ trunk/SKMainWindowController.m      2026-04-06 08:43:22 UTC (rev 16178)
@@ -1723,7 +1723,8 @@
 }
 
 - (void)hideOverviewAnimating:(BOOL)animate completionHandler:(void 
(^)(void))handler {
-    if ([overviewView window] == nil) {
+    NSWindow *window = [overviewContentView window];
+    if (window == nil) {
         if (handler)
             handler();
         return;
@@ -1732,9 +1733,8 @@
     if ([NSView shouldShowFadeAnimation] == NO)
         animate = NO;
     
-    // don't check interactionMode as this can be called from enterPresentation
-    BOOL isPresentation = 0 == ([[overviewContentView window] styleMask] & 
NSWindowStyleMaskTitled);
-    NSView *contentView = [overviewContentView superview];
+    // don't check interactionMode as this can be called from 
enterPresentation/exitPresentation
+    BOOL isPresentation = (window == [presentationView window]);
     
     if (animate) {
         if (handler) {
@@ -1744,13 +1744,13 @@
         CAAnimation *animation = [CATransition animation];
         [animation setDuration:OVERVIEW_DURATION];
         [animation setTimingFunction:[CAMediaTimingFunction 
functionWithName:kCAMediaTimingFunctionDefault]];
-        [[contentView layer] addAnimation:animation forKey:@"animation"];
+        [[[overviewContentView superview] layer] addAnimation:animation 
forKey:@"animation"];
     }
     
     [overviewContentView removeFromSuperview];
     [(isPresentation ? presentationView : [splitViewController view]) 
setHidden:NO];
-    [[contentView window] makeFirstResponder:isPresentation ? presentationView 
: pdfView];
-    [[contentView window] recalculateKeyViewLoop];
+    [window makeFirstResponder:isPresentation ? presentationView : pdfView];
+    [window recalculateKeyViewLoop];
     
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKMainWindowControllerDidShowOrHideOverviewNotification 
object:self];
     

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