Revision: 15348
          http://sourceforge.net/p/skim-app/code/15348
Author:   hofman
Date:     2025-06-02 15:40:30 +0000 (Mon, 02 Jun 2025)
Log Message:
-----------
no need for some frame override methods

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

Modified: trunk/SKMainWindow.h
===================================================================
--- trunk/SKMainWindow.h        2025-06-02 15:31:32 UTC (rev 15347)
+++ trunk/SKMainWindow.h        2025-06-02 15:40:30 UTC (rev 15348)
@@ -60,13 +60,12 @@
     BOOL disableConstrainedFrame;
 }
 
-@property (nonatomic) BOOL disableConstrainedFrame;
-@property (nonatomic) NSRect windowFrame;
-
 @property (nullable, weak) id<SKMainWindowDelegate> delegate;
 
 @property (nonatomic) SKAutoWindowTitleVisibility autoTitleVisibility;;
 
+- (void)setFrameWithoutConstrain:(NSRect)frameRect;
+
 @end
 
 NS_ASSUME_NONNULL_END

Modified: trunk/SKMainWindow.m
===================================================================
--- trunk/SKMainWindow.m        2025-06-02 15:31:32 UTC (rev 15347)
+++ trunk/SKMainWindow.m        2025-06-02 15:40:30 UTC (rev 15348)
@@ -69,8 +69,8 @@
 
 @implementation SKMainWindow
 
-@synthesize disableConstrainedFrame, autoTitleVisibility;
-@dynamic windowFrame, delegate;
+@synthesize autoTitleVisibility;
+@dynamic delegate;
 
 + (id)defaultAnimationForKey:(NSString *)key {
     if ([key isEqualToString:@"windowFrame"]) {
@@ -81,14 +81,6 @@
         return [super defaultAnimationForKey:key];
 }
 
-- (NSRect)windowFrame {
-    return [self frame];
-}
-
-- (void)setWindowFrame:(NSRect)frameRect {
-    [self setFrame:frameRect display:YES];
-}
-
 - (void)setStyleMask:(NSWindowStyleMask)styleMask {
     if (0 != (styleMask & NSWindowStyleMaskFullScreen) && 0 == ([self 
styleMask] & NSWindowStyleMaskFullScreen) && [[self delegate] 
respondsToSelector:@selector(windowWillEnterFullScreenStyle:)])
         [[self delegate] windowWillEnterFullScreenStyle:self];
@@ -119,9 +111,15 @@
 }
 
 - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen {
-    return [self disableConstrainedFrame] ? frameRect : [super 
constrainFrameRect:frameRect toScreen:screen];
+    return disableConstrainedFrame ? frameRect : [super 
constrainFrameRect:frameRect toScreen:screen];
 }
 
+- (void)setFrameWithoutConstrain:(NSRect)frameRect {
+    disableConstrainedFrame = YES;
+    [self setFrame:frameRect display:YES];
+    disableConstrainedFrame = NO;
+}
+
 - (id<SKMainWindowDelegate>)delegate {
     return (id<SKMainWindowDelegate>)[super delegate];
 }

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2025-06-02 15:31:32 UTC (rev 
15347)
+++ trunk/SKMainWindowController_FullScreen.m   2025-06-02 15:40:30 UTC (rev 
15348)
@@ -614,9 +614,7 @@
             noteToolbar = noteToolbarController;
             [window removeTitlebarAccessoryViewControllerAtIndex:i];
         }
-        [(SKMainWindow *)window setDisableConstrainedFrame:YES];
-        [window setFrame:frame display:YES];
-        [(SKMainWindow *)window setDisableConstrainedFrame:NO];
+        [(SKMainWindow *)window setFrameWithoutConstrain:frame];
         blackLayer = [CALayer layer];
         [blackLayer setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
         [blackLayer setZPosition:1.0];

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