From: <ho...@us...> - 2010-07-27 11:25:18
|
Revision: 6657 http://skim-app.svn.sourceforge.net/skim-app/?rev=6657&view=rev Author: hofman Date: 2010-07-27 11:25:12 +0000 (Tue, 27 Jul 2010) Log Message: ----------- cleanup some fullscreen code Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2010-07-27 09:49:14 UTC (rev 6656) +++ trunk/SKMainWindowController.m 2010-07-27 11:25:12 UTC (rev 6657) @@ -1315,24 +1315,23 @@ } - (void)goFullScreen { - NSScreen *screen = [[self window] screen] ?: [NSScreen mainScreen]; // @@ screen: or should we use the main screen? + NSScreen *screen = [[self window] screen] ?: [NSScreen mainScreen]; - // create a new full screen window + // create a new full screen window, it may have to be displayed on a different screen or space SKMainFullScreenWindow *fullScreenWindow = [[[SKMainFullScreenWindow alloc] initWithScreen:screen] autorelease]; if ([[mainWindow firstResponder] isDescendantOf:pdfView]) [mainWindow makeFirstResponder:nil]; - [fullScreenWindow setMainView:([self interactionMode] == SKPresentationMode ? (id)pdfView : (id)pdfSplitView)]; + [fullScreenWindow setMainView:([self interactionMode] == SKPresentationMode ? (NSView *)pdfView : (NSView *)pdfSplitView)]; [self applyBackgroundColorAndLevelForWindow:fullScreenWindow]; [pdfView layoutDocumentView]; [pdfView setNeedsDisplay:YES]; [self forceSubwindowsOnTop:YES]; - - if (NO == [self interactionMode] == SKPresentationMode && [[NSUserDefaults standardUserDefaults] boolForKey:SKBlankAllScreensInFullScreenKey] && [[NSScreen screens] count] > 1) { + + if ([self interactionMode] == SKFullScreenMode && [[NSUserDefaults standardUserDefaults] boolForKey:SKBlankAllScreensInFullScreenKey] && [[NSScreen screens] count] > 1) { if (nil == blankingWindows) blankingWindows = [[NSMutableArray alloc] init]; - [blankingWindows removeAllObjects]; NSColor *backgroundColor = [fullScreenWindow backgroundColor]; for (NSScreen *screenToBlank in [NSScreen screens]) { if ([screenToBlank isEqual:screen] == NO) { @@ -1340,9 +1339,8 @@ [aWindow setBackgroundColor:backgroundColor]; [aWindow setLevel:NSFloatingWindowLevel]; [aWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces]; - [aWindow orderFront:nil]; - [aWindow setReleasedWhenClosed:NO]; [aWindow setHidesOnDeactivate:YES]; + [aWindow orderFront:nil]; [blankingWindows addObject:aWindow]; [aWindow release]; } @@ -1411,7 +1409,7 @@ if (wasInteractionMode == SKFullScreenMode) return; - NSScreen *screen = [[self window] screen] ?: [NSScreen mainScreen]; // @@ screen: or should we use the main screen? + NSScreen *screen = [[self window] screen] ?: [NSScreen mainScreen]; interactionMode = SKFullScreenMode; @@ -1445,7 +1443,7 @@ [self enterPresentationMode]; - NSScreen *screen = [[self window] screen] ?: [NSScreen mainScreen]; // @@ screen: or should we use the main screen? + NSScreen *screen = [[self window] screen] ?: [NSScreen mainScreen]; interactionMode = SKPresentationMode; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |