You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(23) |
Apr
(254) |
May
(252) |
Jun
(209) |
Jul
(198) |
Aug
(192) |
Sep
(207) |
Oct
(120) |
Nov
(179) |
Dec
(52) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(48) |
Feb
(69) |
Mar
(129) |
Apr
(250) |
May
(113) |
Jun
(177) |
Jul
(228) |
Aug
(155) |
Sep
(218) |
Oct
(185) |
Nov
(109) |
Dec
(88) |
2009 |
Jan
(83) |
Feb
(39) |
Mar
(70) |
Apr
(47) |
May
(48) |
Jun
(67) |
Jul
(61) |
Aug
(97) |
Sep
(221) |
Oct
(141) |
Nov
(70) |
Dec
(61) |
2010 |
Jan
(45) |
Feb
(76) |
Mar
(178) |
Apr
(106) |
May
(57) |
Jun
(32) |
Jul
(64) |
Aug
(98) |
Sep
(96) |
Oct
(19) |
Nov
(34) |
Dec
(117) |
2011 |
Jan
(55) |
Feb
(48) |
Mar
(64) |
Apr
(21) |
May
(39) |
Jun
(53) |
Jul
(99) |
Aug
(56) |
Sep
(39) |
Oct
(26) |
Nov
(19) |
Dec
(69) |
2012 |
Jan
(17) |
Feb
(40) |
Mar
(17) |
Apr
|
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(10) |
Sep
(10) |
Oct
(38) |
Nov
(48) |
Dec
(70) |
2013 |
Jan
(43) |
Feb
(47) |
Mar
(39) |
Apr
(37) |
May
(25) |
Jun
(6) |
Jul
(20) |
Aug
(49) |
Sep
(33) |
Oct
(34) |
Nov
(75) |
Dec
(6) |
2014 |
Jan
(32) |
Feb
(10) |
Mar
(17) |
Apr
|
May
|
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(4) |
Oct
(23) |
Nov
(80) |
Dec
(48) |
2015 |
Jan
(80) |
Feb
(50) |
Mar
(58) |
Apr
(20) |
May
(11) |
Jun
(16) |
Jul
(24) |
Aug
(27) |
Sep
(56) |
Oct
(30) |
Nov
(16) |
Dec
(6) |
2016 |
Jan
(31) |
Feb
(14) |
Mar
(23) |
Apr
(17) |
May
(40) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(32) |
Oct
(36) |
Nov
(23) |
Dec
(9) |
2017 |
Jan
(37) |
Feb
(23) |
Mar
(65) |
Apr
(22) |
May
(6) |
Jun
(3) |
Jul
|
Aug
|
Sep
(3) |
Oct
(22) |
Nov
(63) |
Dec
(71) |
2018 |
Jan
(83) |
Feb
(21) |
Mar
(35) |
Apr
(44) |
May
(14) |
Jun
(12) |
Jul
(8) |
Aug
(18) |
Sep
(10) |
Oct
(145) |
Nov
(144) |
Dec
(76) |
2019 |
Jan
(18) |
Feb
(28) |
Mar
(5) |
Apr
(208) |
May
(291) |
Jun
(158) |
Jul
(27) |
Aug
(8) |
Sep
(10) |
Oct
(83) |
Nov
(41) |
Dec
(31) |
2020 |
Jan
(16) |
Feb
(46) |
Mar
(100) |
Apr
(78) |
May
(69) |
Jun
(71) |
Jul
(28) |
Aug
(131) |
Sep
(176) |
Oct
(89) |
Nov
(147) |
Dec
(19) |
2021 |
Jan
(19) |
Feb
(25) |
Mar
(91) |
Apr
(98) |
May
(14) |
Jun
(44) |
Jul
(8) |
Aug
(3) |
Sep
(38) |
Oct
(57) |
Nov
(97) |
Dec
(74) |
2022 |
Jan
(89) |
Feb
(47) |
Mar
(15) |
Apr
(50) |
May
(54) |
Jun
(56) |
Jul
(80) |
Aug
(12) |
Sep
(11) |
Oct
(60) |
Nov
(48) |
Dec
(4) |
2023 |
Jan
(75) |
Feb
(49) |
Mar
(84) |
Apr
(24) |
May
(13) |
Jun
(74) |
Jul
(32) |
Aug
(66) |
Sep
(50) |
Oct
(38) |
Nov
(105) |
Dec
(181) |
2024 |
Jan
(21) |
Feb
(49) |
Mar
(77) |
Apr
(84) |
May
(20) |
Jun
(71) |
Jul
(53) |
Aug
(33) |
Sep
(54) |
Oct
(124) |
Nov
(151) |
Dec
(73) |
2025 |
Jan
(61) |
Feb
(17) |
Mar
(136) |
Apr
(72) |
May
(200) |
Jun
(238) |
Jul
(91) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ho...@us...> - 2025-05-28 09:40:00
|
Revision: 15316 http://sourceforge.net/p/skim-app/code/15316 Author: hofman Date: 2025-05-28 09:39:56 +0000 (Wed, 28 May 2025) Log Message: ----------- use inverted boolean variable and add comment Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-05-28 09:06:11 UTC (rev 15315) +++ trunk/SKMainWindowController.m 2025-05-28 09:39:56 UTC (rev 15316) @@ -1672,15 +1672,16 @@ if ([NSView shouldShowFadeAnimation] == NO) animate = NO; - BOOL isMainWindow = 0 != ([[overviewContentView window] styleMask] & NSWindowStyleMaskTitled); - NSView *newView = isMainWindow ? splitView : presentationView; - NSView *newKeyView = isMainWindow ? pdfView : presentationView; + // don't check interactionMode as this can be called from enterPresentation + BOOL isPresentation = 0 == ([[overviewContentView window] styleMask] & NSWindowStyleMaskTitled); + NSView *newView = isPresentation ? presentationView : splitView; + NSView *newKeyView = isPresentation ? presentationView : pdfView; NSView *contentView = [overviewContentView superview]; - BOOL hasStatus = isMainWindow && [statusBar isVisible]; + BOOL hasStatus = isPresentation == NO && [statusBar isVisible]; NSArray *constraints = @[ [[newView leadingAnchor] constraintEqualToAnchor:[contentView leadingAnchor]], [[contentView trailingAnchor] constraintEqualToAnchor:[newView trailingAnchor]], - [[newView topAnchor] constraintEqualToAnchor:[(mwcFlags.fullSizeContent || isMainWindow == NO ? contentView : [[contentView window] contentLayoutGuide]) topAnchor]], + [[newView topAnchor] constraintEqualToAnchor:[(mwcFlags.fullSizeContent || isPresentation ? contentView : [[contentView window] contentLayoutGuide]) topAnchor]], [(hasStatus ? [statusBar topAnchor] : [contentView bottomAnchor]) constraintEqualToAnchor:[newView bottomAnchor]]]; if (animate) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-28 09:06:15
|
Revision: 15315 http://sourceforge.net/p/skim-app/code/15315 Author: hofman Date: 2025-05-28 09:06:11 +0000 (Wed, 28 May 2025) Log Message: ----------- use viewDidChangeBackingProperties Modified Paths: -------------- trunk/SKPresentationView.m Modified: trunk/SKPresentationView.m =================================================================== --- trunk/SKPresentationView.m 2025-05-28 08:49:17 UTC (rev 15314) +++ trunk/SKPresentationView.m 2025-05-28 09:06:11 UTC (rev 15315) @@ -144,7 +144,10 @@ [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } -- (void)handleWindowDidChangeBackingProperties:(NSNotification *)notifcation { +- (void)viewDidChangeBackingProperties { + [super viewDidChangeBackingProperties]; + if ([self window] == nil) + return; CGFloat scale = [[self window] backingScaleFactor]; if (fabs([pageLayer contentsScale] - scale) > 0.0) { [pageLayer setContentsScale:scale]; @@ -154,23 +157,6 @@ } } -- (void)viewWillMoveToWindow:(NSWindow *)newWindow { - [super viewWillMoveToWindow:newWindow]; - NSWindow *window = [self window]; - if (window) { - [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidChangeBackingPropertiesNotification object:window]; - } -} - -- (void)viewDidMoveToWindow { - [super viewDidMoveToWindow]; - NSWindow *window = [self window]; - if (window) { - [self handleWindowDidChangeBackingProperties:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleWindowDidChangeBackingProperties:) name:NSWindowDidChangeBackingPropertiesNotification object:window]; - } -} - #pragma mark Transitions - (void)displayPage:(PDFPage *)newPage completionHandler:(void (^)(void))completionHandler { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-28 08:49:20
|
Revision: 15314 http://sourceforge.net/p/skim-app/code/15314 Author: hofman Date: 2025-05-28 08:49:17 +0000 (Wed, 28 May 2025) Log Message: ----------- st scale factor of layers Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 22:23:06 UTC (rev 15313) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-28 08:49:17 UTC (rev 15314) @@ -480,6 +480,7 @@ CGImageRef cgImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID)[window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution); [layer setMasksToBounds:YES]; [layer setBounds:[[window contentView] bounds]]; + [layer setContentsScale:[window backingScaleFactor]]; [layer setContents:CFBridgingRelease(cgImage)]; if (([window styleMask] & NSWindowStyleMaskFullScreen) != 0 && autoHideToolbarInFullScreen() == NO && [[window toolbar] isVisible]) { for (NSWindow *tbWindow in [window childWindows]) { @@ -488,6 +489,7 @@ CALayer *tbLayer = [CALayer layer]; [tbLayer setMasksToBounds:YES]; [tbLayer setFrame:[window convertRectFromScreen:[tbWindow frame]]]; + [tbLayer setContentsScale:[window backingScaleFactor]]; [tbLayer setContents:CFBridgingRelease(tbCgImage)]; [layer addSublayer:tbLayer]; break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 22:23:09
|
Revision: 15313 http://sourceforge.net/p/skim-app/code/15313 Author: hofman Date: 2025-05-27 22:23:06 +0000 (Tue, 27 May 2025) Log Message: ----------- force subwindows on top before full screen animation Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 22:18:31 UTC (rev 15312) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-27 22:23:06 UTC (rev 15313) @@ -573,6 +573,7 @@ [secondaryPdfView setBackgroundColor:backgroundColor]; if ([[pdfView document] isLocked] == NO && [fullScreenSetup count]) [self applyPDFSettings:fullScreenSetup rewind:YES]; + [self forceSubwindowsOnTop:YES]; } - (NSApplicationPresentationOptions)window:(NSWindow *)window willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions { @@ -637,7 +638,6 @@ fullScreenToolbarOffset = toolbarItemOffset - fullScreenToolbarOffset; } [touchBarController interactionModeChanged]; - [self forceSubwindowsOnTop:YES]; mwcFlags.isSwitchingFullScreen = 0; } @@ -653,6 +653,7 @@ } if ([[pdfView document] isLocked] == NO || [savedNormalSetup count] == 1) [savedNormalSetup removeAllObjects]; + [self forceSubwindowsOnTop:NO]; savedNormalWindow = nil; interactionMode = SKNormalMode; mwcFlags.isSwitchingFullScreen = 0; @@ -749,7 +750,6 @@ [secondaryPdfView setBackgroundColor:backgroundColor]; if ([[pdfView document] isLocked] == NO && [fullScreenSetup count]) [self applyPDFSettings:fullScreenSetup rewind:YES]; - [self forceSubwindowsOnTop:YES]; } savedNormalWindow = nil; mwcFlags.isSwitchingFullScreen = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 22:18:34
|
Revision: 15312 http://sourceforge.net/p/skim-app/code/15312 Author: hofman Date: 2025-05-27 22:18:31 +0000 (Tue, 27 May 2025) Log Message: ----------- make variable local to loop Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 22:10:40 UTC (rev 15311) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-27 22:18:31 UTC (rev 15312) @@ -477,7 +477,6 @@ NSWindow *displayWindow = savedNormalWindow; NSRect frame = [window frame]; CALayer *layer = [CALayer layer]; - CALayer *tbLayer = nil; CGImageRef cgImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID)[window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution); [layer setMasksToBounds:YES]; [layer setBounds:[[window contentView] bounds]]; @@ -486,7 +485,7 @@ for (NSWindow *tbWindow in [window childWindows]) { if ([NSStringFromClass([tbWindow class]) containsString:@"Toolbar"]) { CGImageRef tbCgImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID)[tbWindow windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution); - tbLayer = [CALayer layer]; + CALayer *tbLayer = [CALayer layer]; [tbLayer setMasksToBounds:YES]; [tbLayer setFrame:[window convertRectFromScreen:[tbWindow frame]]]; [tbLayer setContents:CFBridgingRelease(tbCgImage)]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 22:10:44
|
Revision: 15311 http://sourceforge.net/p/skim-app/code/15311 Author: hofman Date: 2025-05-27 22:10:40 +0000 (Tue, 27 May 2025) Log Message: ----------- draw toolbar screenshot in sublayer Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 15:21:37 UTC (rev 15310) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-27 22:10:40 UTC (rev 15311) @@ -477,28 +477,24 @@ NSWindow *displayWindow = savedNormalWindow; NSRect frame = [window frame]; CALayer *layer = [CALayer layer]; + CALayer *tbLayer = nil; CGImageRef cgImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID)[window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution); + [layer setMasksToBounds:YES]; + [layer setBounds:[[window contentView] bounds]]; + [layer setContents:CFBridgingRelease(cgImage)]; if (([window styleMask] & NSWindowStyleMaskFullScreen) != 0 && autoHideToolbarInFullScreen() == NO && [[window toolbar] isVisible]) { - NSWindow *tbWindow = nil; - for (tbWindow in [window childWindows]) - if ([NSStringFromClass([tbWindow class]) containsString:@"Toolbar"]) + for (NSWindow *tbWindow in [window childWindows]) { + if ([NSStringFromClass([tbWindow class]) containsString:@"Toolbar"]) { + CGImageRef tbCgImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID)[tbWindow windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution); + tbLayer = [CALayer layer]; + [tbLayer setMasksToBounds:YES]; + [tbLayer setFrame:[window convertRectFromScreen:[tbWindow frame]]]; + [tbLayer setContents:CFBridgingRelease(tbCgImage)]; + [layer addSublayer:tbLayer]; break; - if (tbWindow) { - CGImageRef tbCgImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID)[tbWindow windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution); - NSRect tbFrame = [tbWindow frame]; - size_t width = CGImageGetWidth(cgImage), height = CGImageGetHeight(cgImage); - CGFloat sx = width / NSWidth(frame), sy = height / NSHeight(frame); - CGContextRef ctx = CGBitmapContextCreate(NULL, width, height, CGImageGetBitsPerComponent(cgImage), CGImageGetBytesPerRow(cgImage), CGImageGetColorSpace(cgImage), CGImageGetBitmapInfo(cgImage)); - CGContextDrawImage(ctx, CGRectMake(0.0, 0.0, width, height), cgImage); - CGContextDrawImage(ctx, CGRectMake(sx * (NSMinX(tbFrame) - NSMinX(frame)), sy * (NSMinY(tbFrame) - NSMinY(frame)), sx * NSWidth(tbFrame), sy * NSHeight(tbFrame)), tbCgImage); - CGImageRelease(tbCgImage); - CGImageRelease(cgImage); - cgImage = CGBitmapContextCreateImage(ctx); - CGContextRelease(ctx); + } } } - [layer setMasksToBounds:YES]; - [layer setContents:CFBridgingRelease(cgImage)]; [displayWindow setFrame:frame display:NO]; [[displayWindow contentView] setLayer:layer]; [[displayWindow contentView] setWantsLayer:YES]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 15:21:39
|
Revision: 15310 http://sourceforge.net/p/skim-app/code/15310 Author: hofman Date: 2025-05-27 15:21:37 +0000 (Tue, 27 May 2025) Log Message: ----------- Set screenshot CGImage directly in layer hosting view Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 14:35:55 UTC (rev 15309) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-27 15:21:37 UTC (rev 15310) @@ -476,6 +476,7 @@ NSWindow *window = [self window]; NSWindow *displayWindow = savedNormalWindow; NSRect frame = [window frame]; + CALayer *layer = [CALayer layer]; CGImageRef cgImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID)[window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution); if (([window styleMask] & NSWindowStyleMaskFullScreen) != 0 && autoHideToolbarInFullScreen() == NO && [[window toolbar] isVisible]) { NSWindow *tbWindow = nil; @@ -496,10 +497,11 @@ CGContextRelease(ctx); } } - NSImage *image = [[NSImage alloc] initWithCGImage:cgImage size:frame.size]; - CGImageRelease(cgImage); + [layer setMasksToBounds:YES]; + [layer setContents:CFBridgingRelease(cgImage)]; [displayWindow setFrame:frame display:NO]; - [displayWindow addImageViewWithImage:image]; + [[displayWindow contentView] setLayer:layer]; + [[displayWindow contentView] setWantsLayer:YES]; [displayWindow setHasShadow:[window hasShadow]]; [displayWindow setLevel:[window level]]; [displayWindow orderWindow:place relativeTo:window]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 14:36:04
|
Revision: 15309 http://sourceforge.net/p/skim-app/code/15309 Author: hofman Date: 2025-05-27 14:35:55 +0000 (Tue, 27 May 2025) Log Message: ----------- reset force subwindows on top afterr endinf fullscreen Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 14:27:18 UTC (rev 15308) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-27 14:35:55 UTC (rev 15309) @@ -673,7 +673,6 @@ NSNumber *rightWidth = [savedNormalSetup objectForKey:RIGHTSIDEPANEWIDTH_KEY]; if (leftWidth && rightWidth) [self applyLeftSideWidth:[leftWidth doubleValue] rightSideWidth:[rightWidth doubleValue]]; - [self forceSubwindowsOnTop:NO]; } - (NSArray *)customWindowsToExitFullScreenForWindow:(NSWindow *)window { @@ -732,6 +731,7 @@ [[self window] setFrame:NSRectFromString(frameString) display:YES]; if ([[pdfView document] isLocked] == NO || [savedNormalSetup count] == 1) [savedNormalSetup removeAllObjects]; + [self forceSubwindowsOnTop:NO]; mwcFlags.isSwitchingFullScreen = 0; if (mwcFlags.wantsPresentationOrFullScreen) { mwcFlags.wantsPresentationOrFullScreen = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 14:27:21
|
Revision: 15308 http://sourceforge.net/p/skim-app/code/15308 Author: hofman Date: 2025-05-27 14:27:18 +0000 (Tue, 27 May 2025) Log Message: ----------- no need to set normal window level Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 14:26:08 UTC (rev 15307) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-27 14:27:18 UTC (rev 15308) @@ -695,7 +695,6 @@ [window setStyleMask:[window styleMask] & ~NSWindowStyleMaskFullScreen]; setAlphaValueOfTitleBarControls(window, 1.0, NO); [window setFrame:frame display:YES]; - [window setLevel:NSNormalWindowLevel]; if (covered) [window setAlphaValue:1.0]; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { @@ -723,7 +722,6 @@ } completionHandler:^{ [(SKMainWindow *)window setDisableConstrainedFrame:NO]; - [window setLevel:NSNormalWindowLevel]; }]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 14:26:11
|
Revision: 15307 http://sourceforge.net/p/skim-app/code/15307 Author: hofman Date: 2025-05-27 14:26:08 +0000 (Tue, 27 May 2025) Log Message: ----------- place screenshot image behind real window when animating to fullscreen Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 09:32:16 UTC (rev 15306) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-27 14:26:08 UTC (rev 15307) @@ -472,7 +472,7 @@ } } -- (void)displayStaticContentForWindow { +- (void)displayStaticContentForWindowOrdered:(NSWindowOrderingMode)place { NSWindow *window = [self window]; NSWindow *displayWindow = savedNormalWindow; NSRect frame = [window frame]; @@ -502,7 +502,7 @@ [displayWindow addImageViewWithImage:image]; [displayWindow setHasShadow:[window hasShadow]]; [displayWindow setLevel:[window level]]; - [displayWindow orderWindow:NSWindowAbove relativeTo:window]; + [displayWindow orderWindow:place relativeTo:window]; [window setAlphaValue:0.0]; } @@ -602,10 +602,9 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:AppleMenuBarVisibleInFullscreenKey]) frame.size.height -= [[NSApp mainMenu] menuBarHeight] ?: 24.0; if (savedNormalWindow != nil) { - [self displayStaticContentForWindow]; + [self displayStaticContentForWindowOrdered:NSWindowBelow]; [(SKMainWindow *)window setDisableConstrainedFrame:YES]; [window setFrame:frame display:YES]; - [window orderWindow:NSWindowAbove relativeTo:savedNormalWindow]; setAlphaValueOfTitleBarControls(window, 0.0, NO); [(SKMainWindow *)window setDisableConstrainedFrame:NO]; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { @@ -692,7 +691,7 @@ NSRect frame = NSRectFromString([savedNormalSetup objectForKey:MAINWINDOWFRAME_KEY]); if (savedNormalWindow != nil) { BOOL covered = NSContainsRect([window frame], frame); - [self displayStaticContentForWindow]; + [self displayStaticContentForWindowOrdered:NSWindowAbove]; [window setStyleMask:[window styleMask] & ~NSWindowStyleMaskFullScreen]; setAlphaValueOfTitleBarControls(window, 1.0, NO); [window setFrame:frame display:YES]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 09:32:20
|
Revision: 15306 http://sourceforge.net/p/skim-app/code/15306 Author: hofman Date: 2025-05-27 09:32:16 +0000 (Tue, 27 May 2025) Log Message: ----------- declare returned array as mutable so we can add Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-27 09:15:16 UTC (rev 15305) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-27 09:32:16 UTC (rev 15306) @@ -553,7 +553,7 @@ [(animate ? (id)[view animator] : (id)view) setAlphaValue:alpha]; } -static inline NSArray *openWindows(NSWindowController *windowController) { +static inline NSMutableArray *openWindows(NSWindowController *windowController) { NSMutableArray *openWindows = [NSMutableArray array]; for (NSWindowController *wc in [[windowController document] windowControllers]) { NSWindow *window = [wc window]; @@ -585,12 +585,12 @@ } - (NSArray *)customWindowsToEnterFullScreenForWindow:(NSWindow *)window { - NSArray *windows = openWindows(self); + NSMutableArray *windows = openWindows(self); if ([windows count] == 1) return nil; if ([[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion]) { savedNormalWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; - windows = [windows arrayByAddingObject:savedNormalWindow]; + [windows addObject:savedNormalWindow]; } return windows; } @@ -678,12 +678,12 @@ } - (NSArray *)customWindowsToExitFullScreenForWindow:(NSWindow *)window { - NSArray *windows = openWindows(self); + NSMutableArray *windows = openWindows(self); if ([windows count] == 1) return nil; if ([[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion]) { savedNormalWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; - windows = [windows arrayByAddingObject:savedNormalWindow]; + [windows addObject:savedNormalWindow]; } return windows; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-27 09:15:19
|
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. |
From: <ho...@us...> - 2025-05-26 22:23:56
|
Revision: 15304 http://sourceforge.net/p/skim-app/code/15304 Author: hofman Date: 2025-05-26 22:23:53 +0000 (Mon, 26 May 2025) Log Message: ----------- Use local variables for normal window during presentation switch and for static display window for fullscreen animation. Rename ivar. Modified Paths: -------------- trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2025-05-26 17:21:52 UTC (rev 15303) +++ trunk/SKMainWindowController.h 2025-05-26 22:23:53 UTC (rev 15304) @@ -127,7 +127,7 @@ NSArray<NSString *> *tags; double rating; - NSWindow *savedWindow; + NSWindow *savedNormalWindow; SKSideWindow *sideWindow; SKInteractionMode interactionMode; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-05-26 17:21:52 UTC (rev 15303) +++ trunk/SKMainWindowController.m 2025-05-26 22:23:53 UTC (rev 15304) @@ -564,7 +564,7 @@ NSString *rectString = [setup objectForKey:MAINWINDOWFRAME_KEY]; if (rectString) { if ([self interactionMode] == SKPresentationMode) - [savedWindow setFrame:NSRectFromString(rectString) display:NO]; + [savedNormalWindow setFrame:NSRectFromString(rectString) display:NO]; else [[self window] setFrame:NSRectFromString(rectString) display:YES]; } @@ -604,7 +604,7 @@ NSArray *cropBoxes = [self changedCropBoxes]; if ([self interactionMode] == SKPresentationMode) - [setup setObject:NSStringFromRect([savedWindow frame]) forKey:MAINWINDOWFRAME_KEY]; + [setup setObject:NSStringFromRect([savedNormalWindow frame]) forKey:MAINWINDOWFRAME_KEY]; else [setup setObject:NSStringFromRect([[self window] frame]) forKey:MAINWINDOWFRAME_KEY]; [setup setObject:[NSNumber numberWithDouble:[self leftSideWidth]] forKey:LEFTSIDEPANEWIDTH_KEY]; @@ -1638,7 +1638,7 @@ [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; - if (isPresentation && mwcFlags.thumbnailsUpdatedDuringPresentaton == 0 && fabs([[self window] backingScaleFactor] - [savedWindow backingScaleFactor]) > 0.0) { + if (isPresentation && mwcFlags.thumbnailsUpdatedDuringPresentaton == 0 && fabs([[self window] backingScaleFactor] - [savedNormalWindow backingScaleFactor]) > 0.0) { [self allThumbnailsNeedUpdate]; mwcFlags.thumbnailsUpdatedDuringPresentaton = 1; } @@ -2912,7 +2912,7 @@ CGFloat scale = [[self window] backingScaleFactor]; dispatch_queue_t queue = [thumbnail isPlaceholder] ? [[self class] thumbnailQueue] : [[self class] utilityThumbnailQueue]; - if ([self interactionMode] == SKPresentationMode && mwcFlags.thumbnailsNeedUpdateAfterPresentaton == 0 && fabs([savedWindow backingScaleFactor] - scale) > 0.0) + if ([self interactionMode] == SKPresentationMode && mwcFlags.thumbnailsNeedUpdateAfterPresentaton == 0 && fabs([savedNormalWindow backingScaleFactor] - scale) > 0.0) mwcFlags.thumbnailsNeedUpdateAfterPresentaton = 1; dispatch_async(queue, ^{ Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-26 17:21:52 UTC (rev 15303) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-26 22:23:53 UTC (rev 15304) @@ -109,7 +109,7 @@ [leftSideController.topBar setDrawsBackground:NO]; } - if (mwcFlags.thumbnailsUpdatedDuringPresentaton == 0 && fabs([[self window] backingScaleFactor] - [savedWindow backingScaleFactor]) > 0.0) { + if (mwcFlags.thumbnailsUpdatedDuringPresentaton == 0 && fabs([[self window] backingScaleFactor] - [savedNormalWindow backingScaleFactor]) > 0.0) { [self allThumbnailsNeedUpdate]; mwcFlags.thumbnailsUpdatedDuringPresentaton = 1; } @@ -239,11 +239,12 @@ // remember normal setup to return to, we must do this before changing the interactionMode [savedNormalSetup setDictionary:[self currentPDFSettings]]; + NSWindow *normalWindow = [self window]; + savedNormalWindow = normalWindow; + interactionMode = SKPresentationMode; - savedWindow = [self window]; - - NSScreen *screen = [savedWindow screen]; + NSScreen *screen = [normalWindow screen]; if ([self presentationNotesDocument] && [self presentationNotesDocument] != [self document]) { NSArray *screens = [[[[self presentationNotesDocument] mainWindow] screen] alternateScreens]; if ([screens count] > 0 && [screens containsObject:[screen primaryScreen]] == NO) @@ -269,15 +270,15 @@ [self showNotesForPresentationWindow:presentationWindow]; BOOL shouldFadeOut = NO; - if ([[savedWindow tabbedWindows] count] > 1) { - NSUInteger tabIndex = [[savedWindow tabbedWindows] indexOfObject:savedWindow]; - [savedNormalSetup setObject:[savedWindow tabGroup] forKey:TABGROUP_KEY]; + if ([[normalWindow tabbedWindows] count] > 1) { + NSUInteger tabIndex = [[normalWindow tabbedWindows] indexOfObject:normalWindow]; + [savedNormalSetup setObject:[normalWindow tabGroup] forKey:TABGROUP_KEY]; [savedNormalSetup setObject:[NSNumber numberWithUnsignedInteger:tabIndex] forKey:TABINDEX_KEY]; - } else if (NSContainsRect([presentationWindow frame], [savedWindow frame]) == NO) { + } else if (NSContainsRect([presentationWindow frame], [normalWindow frame]) == NO) { shouldFadeOut = YES; } - [savedWindow setDelegate:nil]; + [normalWindow setDelegate:nil]; [self setWindow:presentationWindow]; @@ -292,7 +293,7 @@ [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; [[presentationWindow animator] setAlphaValue:1.0]; if (shouldFadeOut) - [[savedWindow animator] setAlphaValue:0.0]; + [[normalWindow animator] setAlphaValue:0.0]; [[[presentationPreview window] animator] setAlphaValue:1.0]; } completionHandler:^{ @@ -300,8 +301,8 @@ if ([NSScreen screenForWindowHasMenuBar:presentationWindow]) [NSApp setPresentationOptions:NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar]; - [savedWindow orderOutWithoutAnimation]; - [savedWindow setAlphaValue:1.0]; + [normalWindow orderOutWithoutAnimation]; + [normalWindow setAlphaValue:1.0]; if ([self hasOverview]) [self hideOverviewAnimating:NO]; @@ -368,8 +369,11 @@ if (mode != [pdfView extendedDisplayMode]) [pdfView setExtendedDisplayModeAndRewind:mode]; - [self setWindow:savedWindow]; + NSWindow *normalWindow = savedNormalWindow; + savedNormalWindow = nil; + [self setWindow:normalWindow]; + if (mwcFlags.thumbnailsNeedUpdateAfterPresentaton) { mwcFlags.thumbnailsNeedUpdateAfterPresentaton = 0; [self allThumbnailsNeedUpdate]; @@ -379,20 +383,20 @@ NSWindowTabGroup *tabGroup = [savedNormalSetup objectForKey:TABGROUP_KEY]; BOOL moveToTab = [[tabGroup windows] count] > 0; - [savedWindow setAlphaValue:0.0]; - if (NSPointInRect(SKCenterPoint([savedWindow frame]), [[presentationWindow screen] frame]) && moveToTab == NO) { - NSWindowCollectionBehavior collectionBehavior = [savedWindow collectionBehavior]; + [normalWindow setAlphaValue:0.0]; + if (NSPointInRect(SKCenterPoint([normalWindow frame]), [[presentationWindow screen] frame]) && moveToTab == NO) { + NSWindowCollectionBehavior collectionBehavior = [normalWindow collectionBehavior]; // trick to make sure the main window shows up in the same space as the fullscreen window - [savedWindow setCollectionBehavior:collectionBehavior | NSWindowCollectionBehaviorMoveToActiveSpace]; - [savedWindow orderFrontWithoutAnimation]; - dispatch_async(dispatch_get_main_queue(), ^{ [savedWindow setCollectionBehavior:collectionBehavior]; }); + [normalWindow setCollectionBehavior:collectionBehavior | NSWindowCollectionBehaviorMoveToActiveSpace]; + [normalWindow orderFrontWithoutAnimation]; + dispatch_async(dispatch_get_main_queue(), ^{ [normalWindow setCollectionBehavior:collectionBehavior]; }); } else { - [savedWindow orderFrontWithoutAnimation]; + [normalWindow orderFrontWithoutAnimation]; } - if ([pdfView window] == savedWindow) - [savedWindow makeFirstResponder:pdfView]; - [savedWindow setDelegate:self]; - [savedWindow makeKeyWindow]; + if ([pdfView window] == normalWindow) + [normalWindow makeFirstResponder:pdfView]; + [normalWindow setDelegate:self]; + [normalWindow makeKeyWindow]; [NSApp removeWindowsItem:presentationWindow]; [presentationWindow setLevel:NSPopUpMenuWindowLevel]; @@ -401,10 +405,10 @@ if (moveToTab) { NSUInteger tabIndex = [[savedNormalSetup objectForKey:TABINDEX_KEY] unsignedIntegerValue]; - [savedWindow setAlphaValue:1.0]; - [tabGroup insertWindow:savedWindow atIndex:MIN(tabIndex, [[tabGroup windows] count])]; - } else if (NSContainsRect([presentationWindow frame], [savedWindow frame])) { - [savedWindow setAlphaValue:1.0]; + [normalWindow setAlphaValue:1.0]; + [tabGroup insertWindow:normalWindow atIndex:MIN(tabIndex, [[tabGroup windows] count])]; + } else if (NSContainsRect([presentationWindow frame], [normalWindow frame])) { + [normalWindow setAlphaValue:1.0]; } [savedNormalSetup removeAllObjects]; @@ -417,8 +421,8 @@ [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { [context setDuration:PRESENTATION_DURATION]; [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; - if ([savedWindow alphaValue] < 1.0) - [[savedWindow animator] setAlphaValue:1.0]; + if ([normalWindow alphaValue] < 1.0) + [[normalWindow animator] setAlphaValue:1.0]; [[presentationWindow animator] setAlphaValue:0.0]; [[[presentationPreview window] animator] setAlphaValue:0.0]; } @@ -429,8 +433,6 @@ [presentationView setPage:nil]; [presentationView setAutoScales:NO]; - savedWindow = nil; - if (presentationPreview) { [[presentationPreview window] setAnimationBehavior:NSWindowAnimationBehaviorNone]; [presentationPreview close]; @@ -470,7 +472,7 @@ } } -- (void)displayStaticContentForWindow:(NSWindow *)window { +- (void)displayStaticContentForWindow:(NSWindow *)window inWindow:(NSWindow *)displayWindow { NSRect frame = [window frame]; CGImageRef cgImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (CGWindowID)[window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageBestResolution); if (([window styleMask] & NSWindowStyleMaskFullScreen) != 0 && autoHideToolbarInFullScreen() == NO && [[window toolbar] isVisible]) { @@ -494,14 +496,11 @@ } NSImage *image = [[NSImage alloc] initWithCGImage:cgImage size:frame.size]; CGImageRelease(cgImage); - if (savedWindow == nil) - savedWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:frame]; - else - [savedWindow setFrame:frame display:NO]; - [savedWindow addImageViewWithImage:image]; - [savedWindow setHasShadow:[window hasShadow]]; - [savedWindow setLevel:[window level]]; - [savedWindow orderWindow:NSWindowAbove relativeTo:window]; + [displayWindow setFrame:frame display:NO]; + [displayWindow addImageViewWithImage:image]; + [displayWindow setHasShadow:[window hasShadow]]; + [displayWindow setLevel:[window level]]; + [displayWindow orderWindow:NSWindowAbove relativeTo:window]; [window setAlphaValue:0.0]; } @@ -588,8 +587,8 @@ if ([windows count] == 1) return nil; if ([[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion]) { - savedWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; - windows = [windows arrayByAddingObject:savedWindow]; + savedNormalWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; + windows = [windows arrayByAddingObject:savedNormalWindow]; } return windows; } @@ -600,11 +599,11 @@ NSRect frame = SKShrinkRect([[window screen] frame], -fullScreenOffset(window), NSMaxYEdge); if ([[NSUserDefaults standardUserDefaults] boolForKey:AppleMenuBarVisibleInFullscreenKey]) frame.size.height -= [[NSApp mainMenu] menuBarHeight] ?: 24.0; - if (savedWindow != nil) { - [self displayStaticContentForWindow:window]; + if (savedNormalWindow != nil) { + [self displayStaticContentForWindow:window inWindow:savedNormalWindow]; [(SKMainWindow *)window setDisableConstrainedFrame:YES]; [window setFrame:frame display:YES]; - [window orderWindow:NSWindowAbove relativeTo:savedWindow]; + [window orderWindow:NSWindowAbove relativeTo:savedNormalWindow]; setAlphaValueOfTitleBarControls(window, 0.0, NO); [(SKMainWindow *)window setDisableConstrainedFrame:NO]; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { @@ -613,8 +612,8 @@ [[window animator] setAlphaValue:1.0]; } completionHandler:^{ - [savedWindow orderOut:nil]; - savedWindow = nil; + [savedNormalWindow orderOut:nil]; + savedNormalWindow = nil; }]; } else { [(SKMainWindow *)window setDisableConstrainedFrame:YES]; @@ -656,7 +655,7 @@ } if ([[pdfView document] isLocked] == NO || [savedNormalSetup count] == 1) [savedNormalSetup removeAllObjects]; - savedWindow = nil; + savedNormalWindow = nil; interactionMode = SKNormalMode; mwcFlags.isSwitchingFullScreen = 0; } @@ -681,8 +680,8 @@ if ([windows count] == 1) return nil; if ([[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion]) { - savedWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; - windows = [windows arrayByAddingObject:savedWindow]; + savedNormalWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; + windows = [windows arrayByAddingObject:savedNormalWindow]; } return windows; } @@ -689,13 +688,13 @@ - (void)window:(NSWindow *)window startCustomAnimationToExitFullScreenWithDuration:(NSTimeInterval)duration { NSRect frame = NSRectFromString([savedNormalSetup objectForKey:MAINWINDOWFRAME_KEY]); - if (savedWindow != nil) { - [self displayStaticContentForWindow:window]; + if (savedNormalWindow != nil) { + [self displayStaticContentForWindow:window inWindow:savedNormalWindow]; [window setStyleMask:[window styleMask] & ~NSWindowStyleMaskFullScreen]; setAlphaValueOfTitleBarControls(window, 1.0, NO); [window setFrame:frame display:YES]; [window setLevel:NSNormalWindowLevel]; - BOOL covered = NSContainsRect([savedWindow frame], [window frame]); + BOOL covered = NSContainsRect([savedNormalWindow frame], [window frame]); if (covered) [window setAlphaValue:1.0]; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { @@ -703,11 +702,11 @@ [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; if (covered == NO) [[window animator] setAlphaValue:1.0]; - [[savedWindow animator] setAlphaValue:0.0]; + [[savedNormalWindow animator] setAlphaValue:0.0]; } completionHandler:^{ - [savedWindow orderOut:nil]; - savedWindow = nil; + [savedNormalWindow orderOut:nil]; + savedNormalWindow = nil; }]; } else { NSRect startFrame = [window frame]; @@ -756,7 +755,7 @@ [self applyPDFSettings:fullScreenSetup rewind:YES]; [self forceSubwindowsOnTop:YES]; } - savedWindow = nil; + savedNormalWindow = nil; mwcFlags.isSwitchingFullScreen = 0; mwcFlags.wantsPresentationOrFullScreen = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 17:21:55
|
Revision: 15303 http://sourceforge.net/p/skim-app/code/15303 Author: hofman Date: 2025-05-26 17:21:52 +0000 (Mon, 26 May 2025) Log Message: ----------- Use same ivar savedWindow for normal window during presentation and animation window during fullscreen animation Modified Paths: -------------- trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2025-05-26 17:08:43 UTC (rev 15302) +++ trunk/SKMainWindowController.h 2025-05-26 17:21:52 UTC (rev 15303) @@ -127,9 +127,8 @@ NSArray<NSString *> *tags; double rating; - NSWindow *mainWindow; + NSWindow *savedWindow; SKSideWindow *sideWindow; - NSWindow *animationWindow; SKInteractionMode interactionMode; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-05-26 17:08:43 UTC (rev 15302) +++ trunk/SKMainWindowController.m 2025-05-26 17:21:52 UTC (rev 15303) @@ -564,7 +564,7 @@ NSString *rectString = [setup objectForKey:MAINWINDOWFRAME_KEY]; if (rectString) { if ([self interactionMode] == SKPresentationMode) - [mainWindow setFrame:NSRectFromString(rectString) display:NO]; + [savedWindow setFrame:NSRectFromString(rectString) display:NO]; else [[self window] setFrame:NSRectFromString(rectString) display:YES]; } @@ -604,7 +604,7 @@ NSArray *cropBoxes = [self changedCropBoxes]; if ([self interactionMode] == SKPresentationMode) - [setup setObject:NSStringFromRect([mainWindow frame]) forKey:MAINWINDOWFRAME_KEY]; + [setup setObject:NSStringFromRect([savedWindow frame]) forKey:MAINWINDOWFRAME_KEY]; else [setup setObject:NSStringFromRect([[self window] frame]) forKey:MAINWINDOWFRAME_KEY]; [setup setObject:[NSNumber numberWithDouble:[self leftSideWidth]] forKey:LEFTSIDEPANEWIDTH_KEY]; @@ -1638,7 +1638,7 @@ [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; - if (isPresentation && mwcFlags.thumbnailsUpdatedDuringPresentaton == 0 && fabs([[self window] backingScaleFactor] - [mainWindow backingScaleFactor]) > 0.0) { + if (isPresentation && mwcFlags.thumbnailsUpdatedDuringPresentaton == 0 && fabs([[self window] backingScaleFactor] - [savedWindow backingScaleFactor]) > 0.0) { [self allThumbnailsNeedUpdate]; mwcFlags.thumbnailsUpdatedDuringPresentaton = 1; } @@ -2912,7 +2912,7 @@ CGFloat scale = [[self window] backingScaleFactor]; dispatch_queue_t queue = [thumbnail isPlaceholder] ? [[self class] thumbnailQueue] : [[self class] utilityThumbnailQueue]; - if ([self interactionMode] == SKPresentationMode && mwcFlags.thumbnailsNeedUpdateAfterPresentaton == 0 && fabs([mainWindow backingScaleFactor] - scale) > 0.0) + if ([self interactionMode] == SKPresentationMode && mwcFlags.thumbnailsNeedUpdateAfterPresentaton == 0 && fabs([savedWindow backingScaleFactor] - scale) > 0.0) mwcFlags.thumbnailsNeedUpdateAfterPresentaton = 1; dispatch_async(queue, ^{ Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-26 17:08:43 UTC (rev 15302) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-26 17:21:52 UTC (rev 15303) @@ -109,7 +109,7 @@ [leftSideController.topBar setDrawsBackground:NO]; } - if (mwcFlags.thumbnailsUpdatedDuringPresentaton == 0 && fabs([[self window] backingScaleFactor] - [mainWindow backingScaleFactor]) > 0.0) { + if (mwcFlags.thumbnailsUpdatedDuringPresentaton == 0 && fabs([[self window] backingScaleFactor] - [savedWindow backingScaleFactor]) > 0.0) { [self allThumbnailsNeedUpdate]; mwcFlags.thumbnailsUpdatedDuringPresentaton = 1; } @@ -241,9 +241,9 @@ interactionMode = SKPresentationMode; - mainWindow = [self window]; + savedWindow = [self window]; - NSScreen *screen = [mainWindow screen]; + NSScreen *screen = [savedWindow screen]; if ([self presentationNotesDocument] && [self presentationNotesDocument] != [self document]) { NSArray *screens = [[[[self presentationNotesDocument] mainWindow] screen] alternateScreens]; if ([screens count] > 0 && [screens containsObject:[screen primaryScreen]] == NO) @@ -269,15 +269,15 @@ [self showNotesForPresentationWindow:presentationWindow]; BOOL shouldFadeOut = NO; - if ([[mainWindow tabbedWindows] count] > 1) { - NSUInteger tabIndex = [[mainWindow tabbedWindows] indexOfObject:mainWindow]; - [savedNormalSetup setObject:[mainWindow tabGroup] forKey:TABGROUP_KEY]; + if ([[savedWindow tabbedWindows] count] > 1) { + NSUInteger tabIndex = [[savedWindow tabbedWindows] indexOfObject:savedWindow]; + [savedNormalSetup setObject:[savedWindow tabGroup] forKey:TABGROUP_KEY]; [savedNormalSetup setObject:[NSNumber numberWithUnsignedInteger:tabIndex] forKey:TABINDEX_KEY]; - } else if (NSContainsRect([presentationWindow frame], [mainWindow frame]) == NO) { + } else if (NSContainsRect([presentationWindow frame], [savedWindow frame]) == NO) { shouldFadeOut = YES; } - [mainWindow setDelegate:nil]; + [savedWindow setDelegate:nil]; [self setWindow:presentationWindow]; @@ -292,7 +292,7 @@ [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; [[presentationWindow animator] setAlphaValue:1.0]; if (shouldFadeOut) - [[mainWindow animator] setAlphaValue:0.0]; + [[savedWindow animator] setAlphaValue:0.0]; [[[presentationPreview window] animator] setAlphaValue:1.0]; } completionHandler:^{ @@ -300,8 +300,8 @@ if ([NSScreen screenForWindowHasMenuBar:presentationWindow]) [NSApp setPresentationOptions:NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar]; - [mainWindow orderOutWithoutAnimation]; - [mainWindow setAlphaValue:1.0]; + [savedWindow orderOutWithoutAnimation]; + [savedWindow setAlphaValue:1.0]; if ([self hasOverview]) [self hideOverviewAnimating:NO]; @@ -368,7 +368,7 @@ if (mode != [pdfView extendedDisplayMode]) [pdfView setExtendedDisplayModeAndRewind:mode]; - [self setWindow:mainWindow]; + [self setWindow:savedWindow]; if (mwcFlags.thumbnailsNeedUpdateAfterPresentaton) { mwcFlags.thumbnailsNeedUpdateAfterPresentaton = 0; @@ -379,20 +379,20 @@ NSWindowTabGroup *tabGroup = [savedNormalSetup objectForKey:TABGROUP_KEY]; BOOL moveToTab = [[tabGroup windows] count] > 0; - [mainWindow setAlphaValue:0.0]; - if (NSPointInRect(SKCenterPoint([mainWindow frame]), [[presentationWindow screen] frame]) && moveToTab == NO) { - NSWindowCollectionBehavior collectionBehavior = [mainWindow collectionBehavior]; + [savedWindow setAlphaValue:0.0]; + if (NSPointInRect(SKCenterPoint([savedWindow frame]), [[presentationWindow screen] frame]) && moveToTab == NO) { + NSWindowCollectionBehavior collectionBehavior = [savedWindow collectionBehavior]; // trick to make sure the main window shows up in the same space as the fullscreen window - [mainWindow setCollectionBehavior:collectionBehavior | NSWindowCollectionBehaviorMoveToActiveSpace]; - [mainWindow orderFrontWithoutAnimation]; - dispatch_async(dispatch_get_main_queue(), ^{ [mainWindow setCollectionBehavior:collectionBehavior]; }); + [savedWindow setCollectionBehavior:collectionBehavior | NSWindowCollectionBehaviorMoveToActiveSpace]; + [savedWindow orderFrontWithoutAnimation]; + dispatch_async(dispatch_get_main_queue(), ^{ [savedWindow setCollectionBehavior:collectionBehavior]; }); } else { - [mainWindow orderFrontWithoutAnimation]; + [savedWindow orderFrontWithoutAnimation]; } - if ([pdfView window] == mainWindow) - [mainWindow makeFirstResponder:pdfView]; - [mainWindow setDelegate:self]; - [mainWindow makeKeyWindow]; + if ([pdfView window] == savedWindow) + [savedWindow makeFirstResponder:pdfView]; + [savedWindow setDelegate:self]; + [savedWindow makeKeyWindow]; [NSApp removeWindowsItem:presentationWindow]; [presentationWindow setLevel:NSPopUpMenuWindowLevel]; @@ -401,10 +401,10 @@ if (moveToTab) { NSUInteger tabIndex = [[savedNormalSetup objectForKey:TABINDEX_KEY] unsignedIntegerValue]; - [mainWindow setAlphaValue:1.0]; - [tabGroup insertWindow:mainWindow atIndex:MIN(tabIndex, [[tabGroup windows] count])]; - } else if (NSContainsRect([presentationWindow frame], [mainWindow frame])) { - [mainWindow setAlphaValue:1.0]; + [savedWindow setAlphaValue:1.0]; + [tabGroup insertWindow:savedWindow atIndex:MIN(tabIndex, [[tabGroup windows] count])]; + } else if (NSContainsRect([presentationWindow frame], [savedWindow frame])) { + [savedWindow setAlphaValue:1.0]; } [savedNormalSetup removeAllObjects]; @@ -417,8 +417,8 @@ [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { [context setDuration:PRESENTATION_DURATION]; [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; - if ([mainWindow alphaValue] < 1.0) - [[mainWindow animator] setAlphaValue:1.0]; + if ([savedWindow alphaValue] < 1.0) + [[savedWindow animator] setAlphaValue:1.0]; [[presentationWindow animator] setAlphaValue:0.0]; [[[presentationPreview window] animator] setAlphaValue:0.0]; } @@ -429,7 +429,7 @@ [presentationView setPage:nil]; [presentationView setAutoScales:NO]; - mainWindow = nil; + savedWindow = nil; if (presentationPreview) { [[presentationPreview window] setAnimationBehavior:NSWindowAnimationBehaviorNone]; @@ -494,14 +494,14 @@ } NSImage *image = [[NSImage alloc] initWithCGImage:cgImage size:frame.size]; CGImageRelease(cgImage); - if (animationWindow == nil) - animationWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:frame]; + if (savedWindow == nil) + savedWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:frame]; else - [animationWindow setFrame:frame display:NO]; - [animationWindow addImageViewWithImage:image]; - [animationWindow setHasShadow:[window hasShadow]]; - [animationWindow setLevel:[window level]]; - [animationWindow orderWindow:NSWindowAbove relativeTo:window]; + [savedWindow setFrame:frame display:NO]; + [savedWindow addImageViewWithImage:image]; + [savedWindow setHasShadow:[window hasShadow]]; + [savedWindow setLevel:[window level]]; + [savedWindow orderWindow:NSWindowAbove relativeTo:window]; [window setAlphaValue:0.0]; } @@ -588,8 +588,8 @@ if ([windows count] == 1) return nil; if ([[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion]) { - animationWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; - windows = [windows arrayByAddingObject:animationWindow]; + savedWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; + windows = [windows arrayByAddingObject:savedWindow]; } return windows; } @@ -600,11 +600,11 @@ NSRect frame = SKShrinkRect([[window screen] frame], -fullScreenOffset(window), NSMaxYEdge); if ([[NSUserDefaults standardUserDefaults] boolForKey:AppleMenuBarVisibleInFullscreenKey]) frame.size.height -= [[NSApp mainMenu] menuBarHeight] ?: 24.0; - if (animationWindow != nil) { + if (savedWindow != nil) { [self displayStaticContentForWindow:window]; [(SKMainWindow *)window setDisableConstrainedFrame:YES]; [window setFrame:frame display:YES]; - [window orderWindow:NSWindowAbove relativeTo:animationWindow]; + [window orderWindow:NSWindowAbove relativeTo:savedWindow]; setAlphaValueOfTitleBarControls(window, 0.0, NO); [(SKMainWindow *)window setDisableConstrainedFrame:NO]; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { @@ -613,8 +613,8 @@ [[window animator] setAlphaValue:1.0]; } completionHandler:^{ - [animationWindow orderOut:nil]; - animationWindow = nil; + [savedWindow orderOut:nil]; + savedWindow = nil; }]; } else { [(SKMainWindow *)window setDisableConstrainedFrame:YES]; @@ -656,7 +656,7 @@ } if ([[pdfView document] isLocked] == NO || [savedNormalSetup count] == 1) [savedNormalSetup removeAllObjects]; - animationWindow = nil; + savedWindow = nil; interactionMode = SKNormalMode; mwcFlags.isSwitchingFullScreen = 0; } @@ -681,8 +681,8 @@ if ([windows count] == 1) return nil; if ([[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion]) { - animationWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; - windows = [windows arrayByAddingObject:animationWindow]; + savedWindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[window frame]]; + windows = [windows arrayByAddingObject:savedWindow]; } return windows; } @@ -689,13 +689,13 @@ - (void)window:(NSWindow *)window startCustomAnimationToExitFullScreenWithDuration:(NSTimeInterval)duration { NSRect frame = NSRectFromString([savedNormalSetup objectForKey:MAINWINDOWFRAME_KEY]); - if (animationWindow != nil) { + if (savedWindow != nil) { [self displayStaticContentForWindow:window]; [window setStyleMask:[window styleMask] & ~NSWindowStyleMaskFullScreen]; setAlphaValueOfTitleBarControls(window, 1.0, NO); [window setFrame:frame display:YES]; [window setLevel:NSNormalWindowLevel]; - BOOL covered = NSContainsRect([animationWindow frame], [window frame]); + BOOL covered = NSContainsRect([savedWindow frame], [window frame]); if (covered) [window setAlphaValue:1.0]; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { @@ -703,11 +703,11 @@ [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; if (covered == NO) [[window animator] setAlphaValue:1.0]; - [[animationWindow animator] setAlphaValue:0.0]; + [[savedWindow animator] setAlphaValue:0.0]; } completionHandler:^{ - [animationWindow orderOut:nil]; - animationWindow = nil; + [savedWindow orderOut:nil]; + savedWindow = nil; }]; } else { NSRect startFrame = [window frame]; @@ -756,7 +756,7 @@ [self applyPDFSettings:fullScreenSetup rewind:YES]; [self forceSubwindowsOnTop:YES]; } - animationWindow = nil; + savedWindow = nil; mwcFlags.isSwitchingFullScreen = 0; mwcFlags.wantsPresentationOrFullScreen = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 17:08:46
|
Revision: 15302 http://sourceforge.net/p/skim-app/code/15302 Author: hofman Date: 2025-05-26 17:08:43 +0000 (Mon, 26 May 2025) Log Message: ----------- avoi some use of mainWindow ivar Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-05-26 17:00:40 UTC (rev 15301) +++ trunk/SKMainWindowController_UI.m 2025-05-26 17:08:43 UTC (rev 15302) @@ -240,7 +240,7 @@ - (void)windowDidBecomeMain:(NSNotification *)notification { if ([[self window] isEqual:[notification object]]) { [self updateUtilityPanel]; - if ([self interactionMode] == SKPresentationMode && [NSApp isActive] && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && [[self window] isEqual:mainWindow] == NO) + if ([self interactionMode] == SKPresentationMode && [NSApp isActive] && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && ([[self window] styleMask] & NSWindowStyleMaskTitled) == 0) [[self window] setLevel:NSPopUpMenuWindowLevel]; } } @@ -266,7 +266,7 @@ } - (void)windowDidChangeScreen:(NSNotification *)notification { - if ([[notification object] isEqual:[self window]] && [[notification object] isEqual:mainWindow] == NO) { + if ([[notification object] isEqual:[self window]] && ([[notification object] styleMask] & NSWindowStyleMaskTitled) == 0) { NSScreen *screen = [[self window] screen]; [[self window] setFrame:[screen frame] display:NO]; if ([self interactionMode] == SKPresentationMode && sideWindow) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 17:00:42
|
Revision: 15301 http://sourceforge.net/p/skim-app/code/15301 Author: hofman Date: 2025-05-26 17:00:40 +0000 (Mon, 26 May 2025) Log Message: ----------- only set mainWindow during presentation Modified Paths: -------------- trunk/MainWindow.xib trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKMainWindowController_FullScreen.m Modified: trunk/MainWindow.xib =================================================================== --- trunk/MainWindow.xib 2025-05-26 16:42:54 UTC (rev 15300) +++ trunk/MainWindow.xib 2025-05-26 17:00:40 UTC (rev 15301) @@ -11,7 +11,6 @@ <outlet property="centerContentView" destination="1321" id="1526"/> <outlet property="findBarTopConstraint" destination="Twe-rt-5Qm" id="9jp-xi-0gz"/> <outlet property="leftSideContentView" destination="769" id="774"/> - <outlet property="mainWindow" destination="5" id="1554"/> <outlet property="pdfContentView" destination="1315" id="1527"/> <outlet property="pdfSplitView" destination="1314" id="1318"/> <outlet property="rightSideContentView" destination="770" id="775"/> Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2025-05-26 16:42:54 UTC (rev 15300) +++ trunk/SKMainWindowController.h 2025-05-26 17:00:40 UTC (rev 15301) @@ -207,8 +207,6 @@ } mwcFlags; } -@property (nonatomic, nullable, strong) IBOutlet NSWindow *mainWindow; - @property (nonatomic, nullable, strong) IBOutlet SKSplitView *splitView; @property (nonatomic, nullable, strong) IBOutlet NSLayoutConstraint *topConstraint; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-05-26 16:42:54 UTC (rev 15300) +++ trunk/SKMainWindowController.m 2025-05-26 17:00:40 UTC (rev 15301) @@ -218,7 +218,7 @@ @implementation SKMainWindowController -@synthesize mainWindow, splitView, topConstraint, centerContentView, pdfSplitView, pdfContentView, findBarTopConstraint, statusBar, pdfView, secondaryPdfView, leftSideContentView, rightSideContentView, presentationNotesDocument, presentationNotesOffset, notes, thumbnails, snapshots, searchResults, groupedSearchResults, tags, rating, pageLabel, interactionMode, placeholderPdfDocument; +@synthesize splitView, topConstraint, centerContentView, pdfSplitView, pdfContentView, findBarTopConstraint, statusBar, pdfView, secondaryPdfView, leftSideContentView, rightSideContentView, presentationNotesDocument, presentationNotesOffset, notes, thumbnails, snapshots, searchResults, groupedSearchResults, tags, rating, pageLabel, interactionMode, placeholderPdfDocument; @dynamic pdfDocument, presentationUndoManager, selectedNotes, hasNotes, widgetProperties, currentPage, leftSidePaneState, rightSidePaneState, findPaneState, displaysFindPane, leftSidePaneIsOpen, rightSidePaneIsOpen, searchString, hasNoteToolbar, hasOverview, notesMenu; + (BOOL)automaticallyNotifiesObserversOfPageLabel { return NO; } Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-26 16:42:54 UTC (rev 15300) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-26 17:00:40 UTC (rev 15301) @@ -241,6 +241,8 @@ interactionMode = SKPresentationMode; + mainWindow = [self window]; + NSScreen *screen = [mainWindow screen]; if ([self presentationNotesDocument] && [self presentationNotesDocument] != [self document]) { NSArray *screens = [[[[self presentationNotesDocument] mainWindow] screen] alternateScreens]; @@ -427,6 +429,8 @@ [presentationView setPage:nil]; [presentationView setAutoScales:NO]; + mainWindow = nil; + if (presentationPreview) { [[presentationPreview window] setAnimationBehavior:NSWindowAnimationBehaviorNone]; [presentationPreview close]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 16:42:57
|
Revision: 15300 http://sourceforge.net/p/skim-app/code/15300 Author: hofman Date: 2025-05-26 16:42:54 +0000 (Mon, 26 May 2025) Log Message: ----------- Avoid using mainWindow outside presentation mode Modified Paths: -------------- trunk/SKMainWindowController.m trunk/SKMainWindowController_FullScreen.m trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-05-26 15:59:32 UTC (rev 15299) +++ trunk/SKMainWindowController.m 2025-05-26 16:42:54 UTC (rev 15300) @@ -562,8 +562,12 @@ if ([self interactionMode] != SKFullScreenMode) { NSString *rectString = [setup objectForKey:MAINWINDOWFRAME_KEY]; - if (rectString) - [mainWindow setFrame:NSRectFromString(rectString) display:[mainWindow isVisible]]; + if (rectString) { + if ([self interactionMode] == SKPresentationMode) + [mainWindow setFrame:NSRectFromString(rectString) display:NO]; + else + [[self window] setFrame:NSRectFromString(rectString) display:YES]; + } } NSNumber *leftWidth = [setup objectForKey:LEFTSIDEPANEWIDTH_KEY]; @@ -599,7 +603,10 @@ SKDestination dest = [pdfView currentDestinationRotated:&rotated]; NSArray *cropBoxes = [self changedCropBoxes]; - [setup setObject:NSStringFromRect([mainWindow frame]) forKey:MAINWINDOWFRAME_KEY]; + if ([self interactionMode] == SKPresentationMode) + [setup setObject:NSStringFromRect([mainWindow frame]) forKey:MAINWINDOWFRAME_KEY]; + else + [setup setObject:NSStringFromRect([[self window] frame]) forKey:MAINWINDOWFRAME_KEY]; [setup setObject:[NSNumber numberWithDouble:[self leftSideWidth]] forKey:LEFTSIDEPANEWIDTH_KEY]; [setup setObject:[NSNumber numberWithDouble:[self rightSideWidth]] forKey:RIGHTSIDEPANEWIDTH_KEY]; [setup setObject:[NSNumber numberWithUnsignedInteger:dest.pageIndex] forKey:PAGEINDEX_KEY]; @@ -1665,7 +1672,7 @@ if ([NSView shouldShowFadeAnimation] == NO) animate = NO; - BOOL isMainWindow = [overviewContentView window] == mainWindow; + BOOL isMainWindow = 0 != ([[overviewContentView window] styleMask] & NSWindowStyleMaskTitled); NSView *newView = isMainWindow ? splitView : presentationView; NSView *newKeyView = isMainWindow ? pdfView : presentationView; NSView *contentView = [overviewContentView superview]; @@ -1673,7 +1680,7 @@ NSArray *constraints = @[ [[newView leadingAnchor] constraintEqualToAnchor:[contentView leadingAnchor]], [[contentView trailingAnchor] constraintEqualToAnchor:[newView trailingAnchor]], - [[newView topAnchor] constraintEqualToAnchor:[(mwcFlags.fullSizeContent || isMainWindow == NO ? contentView : [mainWindow contentLayoutGuide]) topAnchor]], + [[newView topAnchor] constraintEqualToAnchor:[(mwcFlags.fullSizeContent || isMainWindow == NO ? contentView : [[contentView window] contentLayoutGuide]) topAnchor]], [(hasStatus ? [statusBar topAnchor] : [contentView bottomAnchor]) constraintEqualToAnchor:[newView bottomAnchor]]]; if (animate) { @@ -2523,7 +2530,7 @@ @catch (id e) {} } if (mwcFlags.fullSizeContent) { - @try { [mainWindow removeObserver:self forKeyPath:@"contentLayoutRect" context:&SKMainWindowContentLayoutObservationContext]; } + @try { [[self window] removeObserver:self forKeyPath:@"contentLayoutRect" context:&SKMainWindowContentLayoutObservationContext]; } @catch (id e) {} } if (overviewView) { Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-26 15:59:32 UTC (rev 15299) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-26 16:42:54 UTC (rev 15300) @@ -591,8 +591,8 @@ } - (void)window:(NSWindow *)window startCustomAnimationToEnterFullScreenWithDuration:(NSTimeInterval)duration { - if (fullScreenToolbarOffset <= 0.0 && autoHideToolbarInFullScreen() == NO && [[mainWindow toolbar] isVisible]) - fullScreenToolbarOffset = toolbarViewOffset(mainWindow); + if (fullScreenToolbarOffset <= 0.0 && autoHideToolbarInFullScreen() == NO && [[window toolbar] isVisible]) + fullScreenToolbarOffset = toolbarViewOffset(window); NSRect frame = SKShrinkRect([[window screen] frame], -fullScreenOffset(window), NSMaxYEdge); if ([[NSUserDefaults standardUserDefaults] boolForKey:AppleMenuBarVisibleInFullscreenKey]) frame.size.height -= [[NSApp mainMenu] menuBarHeight] ?: 24.0; @@ -629,8 +629,8 @@ } - (void)windowDidEnterFullScreen:(NSNotification *)notification { - if (fullScreenToolbarOffset < 0.0 && autoHideToolbarInFullScreen() == NO && [[mainWindow toolbar] isVisible]) { - CGFloat toolbarItemOffset = toolbarViewOffset(mainWindow); + if (fullScreenToolbarOffset < 0.0 && autoHideToolbarInFullScreen() == NO && [[[self window] toolbar] isVisible]) { + CGFloat toolbarItemOffset = toolbarViewOffset([self window]); if (toolbarItemOffset < 0.0) // save the offset for the next time, we may guess it wrong as it varies between OS versions fullScreenToolbarOffset = toolbarItemOffset - fullScreenToolbarOffset; Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-05-26 15:59:32 UTC (rev 15299) +++ trunk/SKMainWindowController_UI.m 2025-05-26 16:42:54 UTC (rev 15300) @@ -302,12 +302,12 @@ } - (void)windowDidChangeBackingProperties:(NSNotification *)notification { - if ([notification object] != mainWindow) - return; - CGFloat oldScale = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue]; - if (fabs(oldScale - [[self window] backingScaleFactor]) > 0.0) { - [self allThumbnailsNeedUpdate]; - [self allSnapshotsNeedUpdate]; + if (0 != ([[notification object] styleMask] & NSWindowStyleMaskTitled)) { + CGFloat oldScale = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue]; + if (fabs(oldScale - [[self window] backingScaleFactor]) > 0.0) { + [self allThumbnailsNeedUpdate]; + [self allSnapshotsNeedUpdate]; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 15:59:35
|
Revision: 15299 http://sourceforge.net/p/skim-app/code/15299 Author: hofman Date: 2025-05-26 15:59:32 +0000 (Mon, 26 May 2025) Log Message: ----------- check earlier Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-05-26 15:58:46 UTC (rev 15298) +++ trunk/SKMainWindowController.m 2025-05-26 15:59:32 UTC (rev 15299) @@ -560,9 +560,9 @@ [savedNormalSetup setDictionary:setup]; } else { - NSString *rectString = [setup objectForKey:MAINWINDOWFRAME_KEY]; - if (rectString) { - if ([self interactionMode] != SKFullScreenMode) + if ([self interactionMode] != SKFullScreenMode) { + NSString *rectString = [setup objectForKey:MAINWINDOWFRAME_KEY]; + if (rectString) [mainWindow setFrame:NSRectFromString(rectString) display:[mainWindow isVisible]]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 15:58:47
|
Revision: 15298 http://sourceforge.net/p/skim-app/code/15298 Author: hofman Date: 2025-05-26 15:58:46 +0000 (Mon, 26 May 2025) Log Message: ----------- wee already set the window frame implicitly in full screen Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-05-26 15:39:33 UTC (rev 15297) +++ trunk/SKMainWindowController.m 2025-05-26 15:58:46 UTC (rev 15298) @@ -562,9 +562,7 @@ NSString *rectString = [setup objectForKey:MAINWINDOWFRAME_KEY]; if (rectString) { - if ([self interactionMode] == SKFullScreenMode) - [savedNormalSetup setObject:rectString forKey:MAINWINDOWFRAME_KEY]; - else + if ([self interactionMode] != SKFullScreenMode) [mainWindow setFrame:NSRectFromString(rectString) display:[mainWindow isVisible]]; } @@ -1782,6 +1780,7 @@ NSView *contentView = [findBar superview]; NSLayoutConstraint *barTopConstraint = [findController topConstraint]; CGFloat barHeight = [findController height]; + NSWindow *window = [self window]; if (mwcFlags.fullSizeContent) findBarTopConstraint = nil; @@ -1788,8 +1787,8 @@ else findBarTopConstraint = [[pdfSplitView topAnchor] constraintEqualToAnchor:[contentView topAnchor]]; - if ([[mainWindow firstResponder] isDescendantOf:findBar]) - [mainWindow makeFirstResponder:pdfView]; + if ([[window firstResponder] isDescendantOf:findBar]) + [window makeFirstResponder:pdfView]; if (mwcFlags.fullSizeContent) { [[pdfView scrollView] setAutomaticallyAdjustsContentInsets:YES]; @@ -1808,7 +1807,7 @@ completionHandler:^{ [findBar removeFromSuperview]; [findBarTopConstraint setActive:YES]; - [mainWindow recalculateKeyViewLoop]; + [window recalculateKeyViewLoop]; mwcFlags.isAnimatingFindBar = NO; }]; @@ -1816,7 +1815,7 @@ [findBar removeFromSuperview]; [findBarTopConstraint setActive:YES]; [contentView layoutSubtreeIfNeeded]; - [mainWindow recalculateKeyViewLoop]; + [window recalculateKeyViewLoop]; } } @@ -1872,7 +1871,7 @@ [[barTopConstraint animator] setConstant:0.0]; } completionHandler:^{ - [mainWindow recalculateKeyViewLoop]; + [[self window] recalculateKeyViewLoop]; [findField selectText:nil]; mwcFlags.isAnimatingFindBar = NO; @@ -1879,7 +1878,7 @@ }]; } else { [contentView layoutSubtreeIfNeeded]; - [mainWindow recalculateKeyViewLoop]; + [[self window] recalculateKeyViewLoop]; [findField selectText:nil]; } } @@ -2636,7 +2635,7 @@ } else if (context == &SKMainWindowContentLayoutObservationContext) { - CGFloat titleHeight = NSHeight([mainWindow frame]) - NSHeight([mainWindow contentLayoutRect]); + CGFloat titleHeight = NSHeight([object frame]) - NSHeight([object contentLayoutRect]); if (fabs(titleHeight - titleBarHeight) > 0.0) { titleBarHeight = titleHeight; [rightSideController setTopInset:titleBarHeight]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 15:39:36
|
Revision: 15297 http://sourceforge.net/p/skim-app/code/15297 Author: hofman Date: 2025-05-26 15:39:33 +0000 (Mon, 26 May 2025) Log Message: ----------- don't set window frame from setup when in full screen mode Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-05-26 15:25:06 UTC (rev 15296) +++ trunk/SKMainWindowController.m 2025-05-26 15:39:33 UTC (rev 15297) @@ -561,8 +561,12 @@ } else { NSString *rectString = [setup objectForKey:MAINWINDOWFRAME_KEY]; - if (rectString) - [mainWindow setFrame:NSRectFromString(rectString) display:[mainWindow isVisible]]; + if (rectString) { + if ([self interactionMode] == SKFullScreenMode) + [savedNormalSetup setObject:rectString forKey:MAINWINDOWFRAME_KEY]; + else + [mainWindow setFrame:NSRectFromString(rectString) display:[mainWindow isVisible]]; + } NSNumber *leftWidth = [setup objectForKey:LEFTSIDEPANEWIDTH_KEY]; NSNumber *rightWidth = [setup objectForKey:RIGHTSIDEPANEWIDTH_KEY]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 15:25:09
|
Revision: 15296 http://sourceforge.net/p/skim-app/code/15296 Author: hofman Date: 2025-05-26 15:25:06 +0000 (Mon, 26 May 2025) Log Message: ----------- convenience nswindow methods to show/hide windows wwithout implicit animation Modified Paths: -------------- trunk/NSWindow_SKExtensions.h trunk/NSWindow_SKExtensions.m trunk/SKMainWindowController_FullScreen.m trunk/SKSnapshotWindowController.m Modified: trunk/NSWindow_SKExtensions.h =================================================================== --- trunk/NSWindow_SKExtensions.h 2025-05-26 14:45:06 UTC (rev 15295) +++ trunk/NSWindow_SKExtensions.h 2025-05-26 15:25:06 UTC (rev 15296) @@ -49,6 +49,9 @@ - (NSImageView *)addImageViewWithImage:(nullable NSImage *)image; +- (void)orderFrontWithoutAnimation; +- (void)orderOutWithoutAnimation; + @end NS_ASSUME_NONNULL_END Modified: trunk/NSWindow_SKExtensions.m =================================================================== --- trunk/NSWindow_SKExtensions.m 2025-05-26 14:45:06 UTC (rev 15295) +++ trunk/NSWindow_SKExtensions.m 2025-05-26 15:25:06 UTC (rev 15296) @@ -147,6 +147,20 @@ return imageView; } +- (void)orderFrontWithoutAnimation { + NSWindowAnimationBehavior animationBehavior = [self animationBehavior]; + [self setAnimationBehavior:NSWindowAnimationBehaviorNone]; + [self orderFront:nil]; + [self setAnimationBehavior:animationBehavior]; +} + +- (void)orderOutWithoutAnimation { + NSWindowAnimationBehavior animationBehavior = [self animationBehavior]; + [self setAnimationBehavior:NSWindowAnimationBehaviorNone]; + [self orderOut:nil]; + [self setAnimationBehavior:animationBehavior]; +} + - (BOOL)isRestorable { return NO; } @end Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-26 14:45:06 UTC (rev 15295) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-26 15:25:06 UTC (rev 15296) @@ -298,9 +298,7 @@ if ([NSScreen screenForWindowHasMenuBar:presentationWindow]) [NSApp setPresentationOptions:NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar]; - [mainWindow setAnimationBehavior:NSWindowAnimationBehaviorNone]; - [mainWindow orderOut:nil]; - [mainWindow setAnimationBehavior:NSWindowAnimationBehaviorDefault]; + [mainWindow orderOutWithoutAnimation]; [mainWindow setAlphaValue:1.0]; if ([self hasOverview]) [self hideOverviewAnimating:NO]; @@ -380,22 +378,20 @@ BOOL moveToTab = [[tabGroup windows] count] > 0; [mainWindow setAlphaValue:0.0]; - [mainWindow setAnimationBehavior:NSWindowAnimationBehaviorNone]; if (NSPointInRect(SKCenterPoint([mainWindow frame]), [[presentationWindow screen] frame]) && moveToTab == NO) { NSWindowCollectionBehavior collectionBehavior = [mainWindow collectionBehavior]; // trick to make sure the main window shows up in the same space as the fullscreen window [mainWindow setCollectionBehavior:collectionBehavior | NSWindowCollectionBehaviorMoveToActiveSpace]; - [mainWindow makeKeyAndOrderFront:nil]; + [mainWindow orderFrontWithoutAnimation]; dispatch_async(dispatch_get_main_queue(), ^{ [mainWindow setCollectionBehavior:collectionBehavior]; }); } else { - [mainWindow makeKeyAndOrderFront:nil]; + [mainWindow orderFrontWithoutAnimation]; } if ([pdfView window] == mainWindow) [mainWindow makeFirstResponder:pdfView]; [mainWindow setDelegate:self]; [mainWindow makeKeyWindow]; - [mainWindow setAnimationBehavior:NSWindowAnimationBehaviorDefault]; - + [NSApp removeWindowsItem:presentationWindow]; [presentationWindow setLevel:NSPopUpMenuWindowLevel]; Modified: trunk/SKSnapshotWindowController.m =================================================================== --- trunk/SKSnapshotWindowController.m 2025-05-26 14:45:06 UTC (rev 15295) +++ trunk/SKSnapshotWindowController.m 2025-05-26 15:25:06 UTC (rev 15296) @@ -268,9 +268,7 @@ if (openType == SKSnapshotOpenPreview) { [[self window] setAlphaValue:0.0]; - [[self window] setAnimationBehavior:NSWindowAnimationBehaviorNone]; - [[self window] orderFront:nil]; - [[self window] setAnimationBehavior:NSWindowAnimationBehaviorDefault]; + [[self window] orderFrontWithoutAnimation]; } else if ([self hasWindow]) { [self showWindow:nil]; } @@ -662,9 +660,7 @@ [miniaturizeWindow orderFront:nil]; if (miniaturize) { - [window setAnimationBehavior:NSWindowAnimationBehaviorNone]; - [window orderOut:nil]; - [window setAnimationBehavior:NSWindowAnimationBehaviorDefault]; + [window orderOutWithoutAnimation]; } animating = YES; @@ -676,10 +672,8 @@ } completionHandler:^{ if (miniaturize == NO) { - [window setAnimationBehavior:NSWindowAnimationBehaviorNone]; - [window orderFront:nil]; + [window orderFrontWithoutAnimation]; [self updateWindowLevel]; - [window setAnimationBehavior:NSWindowAnimationBehaviorDefault]; } [miniaturizeWindow orderOut:nil]; animating = NO; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 14:45:13
|
Revision: 15295 http://sourceforge.net/p/skim-app/code/15295 Author: hofman Date: 2025-05-26 14:45:06 +0000 (Mon, 26 May 2025) Log Message: ----------- fade in presentation preview, mistakenly removed Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-26 14:14:05 UTC (rev 15294) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-26 14:45:06 UTC (rev 15295) @@ -291,6 +291,7 @@ [[presentationWindow animator] setAlphaValue:1.0]; if (shouldFadeOut) [[mainWindow animator] setAlphaValue:0.0]; + [[[presentationPreview window] animator] setAlphaValue:1.0]; } 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 14:14:09
|
Revision: 15294 http://sourceforge.net/p/skim-app/code/15294 Author: hofman Date: 2025-05-26 14:14:05 +0000 (Mon, 26 May 2025) Log Message: ----------- prevent fullscreen/presentation switching during animation Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-05-26 14:09:57 UTC (rev 15293) +++ trunk/SKMainWindowController_FullScreen.m 2025-05-26 14:14:05 UTC (rev 15294) @@ -283,6 +283,8 @@ if (activity == nil) activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated | NSActivityIdleDisplaySleepDisabled | NSActivityIdleSystemSleepDisabled reason:@"Presentation"]; + [touchBarController interactionModeChanged]; + [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { [context setDuration:PRESENTATION_DURATION]; [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; @@ -314,8 +316,6 @@ [presentationView didOpen]; - [touchBarController interactionModeChanged]; - mwcFlags.isSwitchingFullScreen = 0; }]; } @@ -415,8 +415,6 @@ [touchBarController interactionModeChanged]; - mwcFlags.isSwitchingFullScreen = 0; - [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { [context setDuration:PRESENTATION_DURATION]; [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; @@ -437,6 +435,8 @@ [presentationPreview close]; } + mwcFlags.isSwitchingFullScreen = 0; + if (mwcFlags.wantsPresentationOrFullScreen) { mwcFlags.wantsPresentationOrFullScreen = 0; [self enterFullscreen]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 14:10:00
|
Revision: 15293 http://sourceforge.net/p/skim-app/code/15293 Author: hofman Date: 2025-05-26 14:09:57 +0000 (Mon, 26 May 2025) Log Message: ----------- use already existing property Modified Paths: -------------- trunk/SKNotesDocument.h trunk/SKNotesDocument.m Modified: trunk/SKNotesDocument.h =================================================================== --- trunk/SKNotesDocument.h 2025-05-26 09:35:45 UTC (rev 15292) +++ trunk/SKNotesDocument.h 2025-05-26 14:09:57 UTC (rev 15293) @@ -73,7 +73,6 @@ @property (nonatomic, nullable, strong) IBOutlet NSSearchField *searchField; @property (nonatomic, readonly,) NSArray<PDFAnnotation *> *notes; @property (nonatomic, nullable, readonly) PDFDocument *pdfDocument; -@property (nonatomic, nullable, readonly) NSWindow *window; @property (nonatomic, nullable, strong) NSURL *sourceFileURL; - (IBAction)openPDF:(nullable id)sender; Modified: trunk/SKNotesDocument.m =================================================================== --- trunk/SKNotesDocument.m 2025-05-26 09:35:45 UTC (rev 15292) +++ trunk/SKNotesDocument.m 2025-05-26 14:09:57 UTC (rev 15293) @@ -112,7 +112,6 @@ @implementation SKNotesDocument @synthesize outlineView, statusBar, arrayController, searchField, notes, pdfDocument, sourceFileURL; -@dynamic window; - (instancetype)init { self = [super init]; @@ -135,11 +134,6 @@ return @"NotesDocument"; } -- (NSWindow *)window { - NSArray *wcs = [self windowControllers]; - return [wcs count] > 0 ? [[wcs objectAtIndex:0] window] : nil; -} - - (void)showWindows{ NSWindowController *wc = [[self windowControllers] lastObject]; BOOL wasVisible = [wc isWindowLoaded] && [[wc window] isVisible]; @@ -602,12 +596,12 @@ } - (IBAction)toggleFullscreen:(id)sender { - [[self window] toggleFullScreen:sender]; + [[self mainWindow] toggleFullScreen:sender]; } - (void)performFindPanelAction:(id)sender { if ([sender tag] == NSFindPanelActionShowFindPanel) { - NSToolbar *toolbar = [[self window] toolbar]; + NSToolbar *toolbar = [[self mainWindow] toolbar]; if ([[[toolbar items] valueForKey:@"itemIdentifier"] containsObject:SKNotesDocumentSearchToolbarItemIdentifier] == NO) [toolbar insertItemWithItemIdentifier:SKNotesDocumentSearchToolbarItemIdentifier atIndex:0]; if ([toolbar displayMode] == NSToolbarDisplayModeLabelOnly) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-05-26 09:35:49
|
Revision: 15292 http://sourceforge.net/p/skim-app/code/15292 Author: hofman Date: 2025-05-26 09:35:45 +0000 (Mon, 26 May 2025) Log Message: ----------- Implement interactionMode accesors in document category, no need for scriptingInteractionMode as separate property Modified Paths: -------------- trunk/NSDocument_SKExtensions.h trunk/NSDocument_SKExtensions.m trunk/SKMainDocument.m trunk/SKNotesDocument.m trunk/Skim.sdef Modified: trunk/NSDocument_SKExtensions.h =================================================================== --- trunk/NSDocument_SKExtensions.h 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/NSDocument_SKExtensions.h 2025-05-26 09:35:45 UTC (rev 15292) @@ -60,7 +60,7 @@ @property (nonatomic, nullable, readonly) NSMenu *notesMenu; -@property (nonatomic, readonly) SKInteractionMode interactionMode; +@property (nonatomic) SKInteractionMode interactionMode; #pragma mark Document Setup @@ -125,7 +125,6 @@ @property (nonatomic, nullable, readonly) NSDictionary<NSString *, id> *documentAttributes; @property (nonatomic, readonly, getter=isPDFDocument) BOOL PDFDocument; @property (nonatomic, readonly) NSInteger toolMode; -@property (nonatomic) NSInteger scriptingInteractionMode; @property (nonatomic, nullable, readonly) NSDocument *presentationNotesDocument; @property (nonatomic, readonly) NSInteger presentationNotesOffset; @property (nonatomic, nullable, readonly) id readingBar; Modified: trunk/NSDocument_SKExtensions.m =================================================================== --- trunk/NSDocument_SKExtensions.m 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/NSDocument_SKExtensions.m 2025-05-26 09:35:45 UTC (rev 15292) @@ -95,6 +95,11 @@ return ([[self mainWindow] styleMask] & NSWindowStyleMaskFullScreen) == 0 ? SKNormalMode : SKFullScreenMode; } +- (void)setInteractionMode:(SKInteractionMode)mode { + if (mode != [self interactionMode] && (mode == SKFullScreenMode || mode == SKNormalMode)) + [[self mainWindow] toggleFullScreen:nil]; +} + #pragma mark Document Setup - (void)saveRecentDocumentInfo { @@ -362,10 +367,6 @@ - (NSInteger)toolMode { return 0; } -- (NSInteger)scriptingInteractionMode { return [self interactionMode]; } - -- (void)setScriptingInteractionMode:(NSInteger)mode {} - - (NSDocument *)presentationNotesDocument { return nil; } - (NSInteger)presentationNotesOffset { return 0; } Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/SKMainDocument.m 2025-05-26 09:35:45 UTC (rev 15292) @@ -1840,7 +1840,7 @@ [[self pdfView] setToolMode:newToolMode]; } -- (void)setScriptingInteractionMode:(NSInteger)mode { +- (void)setInteractionMode:(SKInteractionMode)mode { if (mode == SKNormalMode) { if ([[self mainWindowController] canExitFullscreen]) [[self mainWindowController] exitFullscreen]; Modified: trunk/SKNotesDocument.m =================================================================== --- trunk/SKNotesDocument.m 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/SKNotesDocument.m 2025-05-26 09:35:45 UTC (rev 15292) @@ -1014,9 +1014,4 @@ [outlineView selectRowIndexes:rowIndexes byExtendingSelection:NO]; } -- (void)setScriptingInteractionMode:(NSInteger)mode { - if (mode != [self interactionMode] && (mode == SKFullScreenMode || mode == SKNormalMode)) - [self toggleFullscreen:nil]; -} - @end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/Skim.sdef 2025-05-26 09:35:45 UTC (rev 15292) @@ -723,7 +723,7 @@ </property> <property name="interaction mode" type="interaction mode type" code="IMod" description="The interaction mode for the document."> - <cocoa key="scriptingInteractionMode"/> + <cocoa key="interactionMode"/> </property> <property name="containing PDF" type="boolean" code="iPDF" access="r" description="Is this a PDF document?"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |