Revision: 9502
http://sourceforge.net/p/skim-app/code/9502
Author: hofman
Date: 2017-11-26 22:49:37 +0000 (Sun, 26 Nov 2017)
Log Message:
-----------
Allow moving between presentation and native fullscreen modes directly, exit
fullscreen first
Modified Paths:
--------------
trunk/SKMainWindowController.h
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2017-11-26 22:11:28 UTC (rev 9501)
+++ trunk/SKMainWindowController.h 2017-11-26 22:49:37 UTC (rev 9502)
@@ -181,6 +181,7 @@
unsigned int isEditingPDF:1;
unsigned int isEditingTable:1;
unsigned int isSwitchingFullScreen:1;
+ unsigned int wantsPresentation:1;
} mwcFlags;
}
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2017-11-26 22:11:28 UTC (rev 9501)
+++ trunk/SKMainWindowController.m 2017-11-26 22:49:37 UTC (rev 9502)
@@ -1468,11 +1468,15 @@
if ([self canEnterFullscreen] == NO)
return;
+ if (wasInteractionMode == SKPresentationMode) {
+ [self exitFullscreen];
+ }
+
if ([self useNativeFullScreen]) {
[[self window] toggleFullScreen:nil];
return;
}
-
+
NSColor *backgroundColor = [[NSUserDefaults standardUserDefaults]
colorForKey:SKFullScreenBackgroundColorKey];
NSDictionary *fullScreenSetup = [[NSUserDefaults standardUserDefaults]
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey];
PDFPage *page = [[self pdfView] currentPage];
@@ -1535,6 +1539,12 @@
if ([self canEnterPresentation] == NO)
return;
+ if (wasInteractionMode == SKFullScreenMode) {
+ mwcFlags.wantsPresentation = 1;
+ [[self window] toggleFullScreen:nil];
+ return;
+ }
+
NSColor *backgroundColor = [NSColor blackColor];
NSInteger level = [[NSUserDefaults standardUserDefaults]
boolForKey:SKUseNormalLevelForPresentationKey] ? NSNormalWindowLevel :
NSPopUpMenuWindowLevel;
PDFPage *page = [[self pdfView] currentPage];
@@ -1662,7 +1672,7 @@
if (mwcFlags.isSwitchingFullScreen)
return NO;
if ([self useNativeFullScreen])
- return [self interactionMode] == SKNormalMode;
+ return [self interactionMode] == SKNormalMode || [self
interactionMode] == SKPresentationMode;
else
return [[self pdfDocument] isLocked] == NO &&
([self interactionMode] == SKNormalMode || [self
interactionMode] == SKPresentationMode) &&
@@ -1671,7 +1681,7 @@
- (BOOL)canEnterPresentation {
return mwcFlags.isSwitchingFullScreen == 0 && [[self pdfDocument]
isLocked] == NO &&
- ([self interactionMode] == SKNormalMode || [self interactionMode]
== SKLegacyFullScreenMode) &&
+ ([self interactionMode] == SKNormalMode || [self interactionMode]
== SKFullScreenMode || [self interactionMode] == SKLegacyFullScreenMode) &&
((NSInteger)floor(NSAppKitVersionNumber) !=
(NSInteger)NSAppKitVersionNumber10_12 || [[[self window] tabbedWindows] count]
< 2);
}
@@ -1810,6 +1820,10 @@
if ([[pdfView document] isLocked] == NO || [savedNormalSetup count] == 1)
[savedNormalSetup removeAllObjects];
mwcFlags.isSwitchingFullScreen = 0;
+ if (mwcFlags.wantsPresentation) {
+ mwcFlags.wantsPresentation = 0;
+ [self enterPresentation];
+ }
}
#pragma mark Swapping tables
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit