Revision: 16194
          http://sourceforge.net/p/skim-app/code/16194
Author:   hofman
Date:     2026-04-08 16:22:15 +0000 (Wed, 08 Apr 2026)
Log Message:
-----------
combine some common code

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

Modified: trunk/SKPresentationView.m
===================================================================
--- trunk/SKPresentationView.m  2026-04-08 16:01:24 UTC (rev 16193)
+++ trunk/SKPresentationView.m  2026-04-08 16:22:15 UTC (rev 16194)
@@ -1114,13 +1114,6 @@
 
 - (void)didOpen {
     [self setAutoScales:YES];
-    if ([pageLayer opacity] < 1.0) {
-        [CATransaction begin];
-        [CATransaction setDisableActions:YES];
-        [pageLayer setOpacity:1.0];
-        [CATransaction commit];
-    }
-    
     [self performSelectorOnce:@selector(setCursorForMouse:) afterDelay:0.0];
     [self performSelectorOnce:@selector(autoHide) afterDelay:AUTO_HIDE_DELAY];
 }
@@ -1210,7 +1203,7 @@
     }
 }
 
-- (void)resetAutoHide {
+- (void)willCloseOrHide {
     if ([pageLayer opacity] < 1.0) {
         [CATransaction begin];
         [CATransaction setDisableActions:YES];
@@ -1217,22 +1210,11 @@
         [pageLayer setOpacity:1.0];
         [CATransaction commit];
     }
-    pvFlags.cursorHidden = NO;
-    [NSCursor setHiddenUntilMouseMoves:NO];
+    [self willClose];
     [[NSCursor arrowCursor] set];
-    if (navWindow) {
-        [navWindow remove];
-        navWindow = nil;
-    }
-    if (cursorWindow) {
-        [cursorWindow remove];
-        cursorWindow = nil;
-    }
 }
 
 - (void)viewWillMoveToWindow:(NSWindow *)newWindow {
-    [self cancelDelayedRequests];
-    
     NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
     NSWindow *oldWindow = [self window];
     if (oldWindow) {
@@ -1243,7 +1225,7 @@
         [nc addObserver:self 
selector:@selector(handleWindowDidBecomeKeyNotification:) 
name:NSWindowDidBecomeKeyNotification object:newWindow];
         [nc addObserver:self 
selector:@selector(handleWindowDidResignKeyNotification:) 
name:NSWindowDidResignKeyNotification object:newWindow];
     } else {
-        [self resetAutoHide];
+        [self willCloseOrHide];
     }
     
     [super viewWillMoveToWindow:newWindow];
@@ -1257,8 +1239,7 @@
 }
 
 - (void)viewDidHide {
-    [self cancelDelayedRequests];
-    [self resetAutoHide];
+    [self willCloseOrHide];
     
     [super viewDidHide];
 }

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