Revision: 14848
          http://sourceforge.net/p/skim-app/code/14848
Author:   hofman
Date:     2024-12-30 09:59:17 +0000 (Mon, 30 Dec 2024)
Log Message:
-----------
move presentation window to normal level when not main, for instance to show 
other windows like the preference window

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

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2024-12-27 10:30:49 UTC (rev 14847)
+++ trunk/SKMainWindowController_UI.m   2024-12-30 09:59:17 UTC (rev 14848)
@@ -238,13 +238,20 @@
 }
 
 - (void)windowDidBecomeMain:(NSNotification *)notification {
-    if ([[self window] isEqual:[notification object]])
+    if ([[self window] isEqual:[notification object]]) {
         [self updateUtilityPanel];
+        if ([self interactionMode] == SKPresentationMode && [NSApp isActive] 
&& [[NSUserDefaults standardUserDefaults] 
boolForKey:SKUseNormalLevelForPresentationKey] == NO)
+            [[self window] setLevel:NSPopUpMenuWindowLevel];
+    }
 }
 
 - (void)windowDidResignMain:(NSNotification *)notification {
-    if ([[[NSColorPanel sharedColorPanel] accessoryView] 
isEqual:colorAccessoryView])
-        [[NSColorPanel sharedColorPanel] setAccessoryView:nil];
+    if ([[self window] isEqual:[notification object]]) {
+        if ([[[NSColorPanel sharedColorPanel] accessoryView] 
isEqual:colorAccessoryView])
+            [[NSColorPanel sharedColorPanel] setAccessoryView:nil];
+        if ([self interactionMode] == SKPresentationMode && [[NSUserDefaults 
standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO)
+            [[self window] setLevel:NSNormalWindowLevel];
+    }
 }
 
 - (void)windowWillClose:(NSNotification *)notification {

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