Revision: 15536
http://sourceforge.net/p/skim-app/code/15536
Author: hofman
Date: 2025-06-23 22:04:15 +0000 (Mon, 23 Jun 2025)
Log Message:
-----------
Set windo delegate to nil before witching to presentation mode, so we don't
need to check for savedNormalWindow.
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
trunk/SKMainWindowController_UI.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2025-06-23 22:00:03 UTC (rev
15535)
+++ trunk/SKMainWindowController_FullScreen.m 2025-06-23 22:04:15 UTC (rev
15536)
@@ -239,6 +239,8 @@
NSWindow *normalWindow = [self window];
savedNormalWindow = normalWindow;
+ [normalWindow setDelegate:nil];
+
interactionMode = SKPresentationMode;
NSScreen *screen = [normalWindow screen];
@@ -275,8 +277,6 @@
shouldFadeOut = YES;
}
- [normalWindow setDelegate:nil];
-
[self setWindow:presentationWindow];
// prevent sleep
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2025-06-23 22:00:03 UTC (rev 15535)
+++ trunk/SKMainWindowController_UI.m 2025-06-23 22:04:15 UTC (rev 15536)
@@ -234,7 +234,7 @@
- (void)windowDidBecomeMain:(NSNotification *)notification {
if ([self interactionMode] != SKPresentationMode) {
[self updateUtilityPanel];
- } else if ([NSApp isActive] && [[NSUserDefaults standardUserDefaults]
boolForKey:SKUseNormalLevelForPresentationKey] == NO && [self window] !=
savedNormalWindow) {
+ } else if ([NSApp isActive] && [[NSUserDefaults standardUserDefaults]
boolForKey:SKUseNormalLevelForPresentationKey] == NO) {
[[self window] setLevel:NSPopUpMenuWindowLevel];
}
}
@@ -244,7 +244,7 @@
[[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil];
if ([[[NSColorPanel sharedColorPanel] accessoryView]
isEqual:colorAccessoryView] || [[[NSColorPanel sharedColorPanel] accessoryView]
isEqual:textColorAccessoryView])
[[NSColorPanel sharedColorPanel] setAccessoryView:nil];
- } else if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKUseNormalLevelForPresentationKey] == NO && [self window] !=
savedNormalWindow) {
+ } else if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKUseNormalLevelForPresentationKey] == NO) {
[[self window] setLevel:NSNormalWindowLevel];
}
}
@@ -256,7 +256,7 @@
}
- (void)windowDidChangeScreen:(NSNotification *)notification {
- if ([self interactionMode] == SKPresentationMode && [self window] !=
savedNormalWindow) {
+ if ([self interactionMode] == SKPresentationMode) {
NSScreen *screen = [[self window] screen];
[[self window] setFrame:[screen frame] display:NO];
if (sideWindow) {
@@ -270,7 +270,7 @@
}
- (void)windowDidMove:(NSNotification *)notification {
- if ([self interactionMode] == SKPresentationMode && [self window] !=
savedNormalWindow) {
+ if ([self interactionMode] == SKPresentationMode) {
if ([[self window] styleMask] == NSWindowStyleMaskBorderless) {
NSScreen *screen = [[self window] screen];
NSRect screenFrame = [screen frame];
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