Revision: 13700
http://sourceforge.net/p/skim-app/code/13700
Author: hofman
Date: 2023-10-25 22:31:14 +0000 (Wed, 25 Oct 2023)
Log Message:
-----------
check AppleMenuBarVisibleInFullscreen pref in global domain rather than
fullscreen presentation options, because the auto-hide menubar option is never
unset
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2023-10-25 16:55:21 UTC (rev
13699)
+++ trunk/SKMainWindowController_FullScreen.m 2023-10-25 22:31:14 UTC (rev
13700)
@@ -79,6 +79,8 @@
#define SKCollapseSidePanesInFullScreenKey @"SKCollapseSidePanesInFullScreen"
#define SKResizablePresentationKey @"SKResizablePresentation"
+#define AppleMenuBarVisibleInFullscreenKey @"AppleMenuBarVisibleInFullscreen"
+
#define PRESENTATION_DURATION 0.5
static BOOL autoHideToolbarInFullScreen = NO;
@@ -86,8 +88,6 @@
static CGFloat fullScreenToolbarOffset = 0.0;
-static BOOL showMenuBarInFullScreen = NO;
-
#if SDK_BEFORE(10_12)
@interface NSWorkSpace (BDSKSierraDeclarations)
- (void)accessibilityDisplayShouldReduceMotion;
@@ -625,8 +625,6 @@
}
- (NSApplicationPresentationOptions)window:(NSWindow *)window
willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions
{
- if (RUNNING_AFTER(11_0))
- showMenuBarInFullScreen = (proposedOptions &
NSApplicationPresentationAutoHideMenuBar) == 0;
if (autoHideToolbarInFullScreen)
return proposedOptions | NSApplicationPresentationAutoHideToolbar;
return proposedOptions;
@@ -648,7 +646,7 @@
if (fullScreenToolbarOffset <= 0.0 && autoHideToolbarInFullScreen == NO &&
[[mainWindow toolbar] isVisible])
fullScreenToolbarOffset = toolbarViewOffset(mainWindow);
NSRect frame = SKShrinkRect([[window screen] frame],
-fullScreenOffset(window), NSMaxYEdge);
- if (showMenuBarInFullScreen)
+ if ([[NSUserDefaults standardUserDefaults]
boolForKey:AppleMenuBarVisibleInFullscreenKey])
frame.size.height -= [[NSApp mainMenu] menuBarHeight];
if (animationWindow != nil) {
[self showStaticContentForWindow:window];
@@ -746,8 +744,6 @@
NSRect frame = NSRectFromString([savedNormalSetup
objectForKey:MAINWINDOWFRAME_KEY]);
if (animationWindow != nil) {
[self showStaticContentForWindow:window];
- if (showMenuBarInFullScreen == NO)
- [animationWindow setLevel:NSStatusWindowLevel];
[window setStyleMask:[window styleMask] &
~NSWindowStyleMaskFullScreen];
setAlphaValueOfTitleBarControls(window, 1.0, NO);
[window setFrame:frame display:YES];
@@ -773,8 +769,6 @@
setAlphaValueOfTitleBarControls(window, 0.0, NO);
[(SKMainWindow *)window setDisableConstrainedFrame:YES];
[window setFrame:startFrame display:YES];
- if (showMenuBarInFullScreen == NO)
- [window setLevel:NSStatusWindowLevel];
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
[context setDuration:duration];
[[window animator] setFrame:frame display:YES];
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