Revision: 6615
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6615&view=rev
Author:   hofman
Date:     2010-07-13 09:37:54 +0000 (Tue, 13 Jul 2010)

Log Message:
-----------
allow blacking window to become main, so no other window will become main 
during fadeout. Move some settings of fullscreen window to initializer.

Modified Paths:
--------------
    trunk/SKFullScreenWindow.m
    trunk/SKMainWindowController.m

Modified: trunk/SKFullScreenWindow.m
===================================================================
--- trunk/SKFullScreenWindow.m  2010-07-13 00:18:42 UTC (rev 6614)
+++ trunk/SKFullScreenWindow.m  2010-07-13 09:37:54 UTC (rev 6615)
@@ -67,7 +67,7 @@
 
 - (BOOL)canBecomeKeyWindow { return NO; }
 
-- (BOOL)canBecomeMainWindow { return NO; }
+- (BOOL)canBecomeMainWindow { return YES; }
 
 - (void)orderFront:(id)sender {
     [self stopAnimation];
@@ -137,6 +137,7 @@
         [self setReleasedWhenClosed:NO];
         [self setDisplaysWhenScreenProfileChanges:YES];
         [self setAcceptsMouseMovedEvents:YES];
+        [self setExcludedFromWindowsMenu:NO];
     }
     return self;
 }

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2010-07-13 00:18:42 UTC (rev 6614)
+++ trunk/SKMainWindowController.m      2010-07-13 09:37:54 UTC (rev 6615)
@@ -1315,21 +1315,15 @@
     NSInteger level = [self isPresentation] && [[NSUserDefaults 
standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] ? 
NSPopUpMenuWindowLevel : NSNormalWindowLevel;
     
     // Create the full-screen window if it does not already  exist.
-    if (fullScreenWindow == nil) {
+    if (fullScreenWindow == nil)
         fullScreenWindow = [[SKFullScreenWindow alloc] initWithScreen:screen];
-        [fullScreenWindow setExcludedFromWindowsMenu:NO];
-    }
         
     // explicitly set window frame; screen may have moved, or may be nil (in 
which case [fullScreenWindow frame] is wrong, which is weird); the first time 
through this method, [fullScreenWindow screen] is nil
     [fullScreenWindow setFrame:[screen frame] display:NO];
     
     if ([[mainWindow firstResponder] isDescendantOf:pdfView])
         [mainWindow makeFirstResponder:nil];
-    if ([self isPresentation]) {
-        [fullScreenWindow setMainView:pdfView];
-    } else {
-        [fullScreenWindow setMainView:pdfSplitView];
-    }
+    [fullScreenWindow setMainView:([self isPresentation] ? (id)pdfView : 
(id)pdfSplitView)];
     [fullScreenWindow setBackgroundColor:backgroundColor];
     [fullScreenWindow setLevel:level];
     [pdfView setBackgroundColor:[self isPresentation] ? [NSColor clearColor] : 
backgroundColor];
@@ -1365,7 +1359,6 @@
     [self setWindow:fullScreenWindow];
     [fullScreenWindow makeKeyAndOrderFront:self];
     [fullScreenWindow makeFirstResponder:pdfView];
-    [fullScreenWindow setAcceptsMouseMovedEvents:YES];
     [fullScreenWindow recalculateKeyViewLoop];
     [mainWindow orderOut:self];    
     [fullScreenWindow setDelegate:self];
@@ -1526,10 +1519,7 @@
     
     SetSystemUIMode(kUIModeNormal, 0);
     
-    NSEnumerator *wcEnum = [[[self document] windowControllers] 
objectEnumerator];
-    NSWindowController *wc = [wcEnum nextObject];
-    
-    while (wc = [wcEnum nextObject]) {
+    for (NSWindowController *wc in [[self document] windowControllers]) {
         if ([wc isNoteWindowController] || [wc isSnapshotWindowController])
             [(id)wc setForceOnTop:NO];
     }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to