Revision: 6942
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6942&view=rev
Author:   hofman
Date:     2010-12-07 15:45:06 +0000 (Tue, 07 Dec 2010)

Log Message:
-----------
use mainScreen to constrain window frame when the window's screen is not yet 
known

Modified Paths:
--------------
    trunk/SKMainWindowController_Actions.m
    trunk/SKSnapshotWindowController.m

Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m      2010-12-06 21:42:13 UTC (rev 
6941)
+++ trunk/SKMainWindowController_Actions.m      2010-12-07 15:45:06 UTC (rev 
6942)
@@ -795,7 +795,7 @@
     // Align the window frame from the old topleft point and constrain to the 
screen
     frame.origin.y = NSMaxY(frame) - size.height;
     frame.size = size;
-    frame = SKConstrainRect(frame, [[[self window] screen] visibleFrame]);
+    frame = SKConstrainRect(frame, [([[self window] screen] ?: [NSScreen 
mainScreen]) visibleFrame]);
     
     [[self window] setFrame:frame display:[[self window] isVisible]];
 }

Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m  2010-12-06 21:42:13 UTC (rev 6941)
+++ trunk/SKSnapshotWindowController.m  2010-12-07 15:45:06 UTC (rev 6942)
@@ -237,7 +237,7 @@
     contentRect.size.width += [NSScroller scrollerWidth];
     contentRect.size.height += [NSScroller scrollerWidth];
     frame.size = [[self window] frameRectForContentRect:contentRect].size;
-    frame = SKConstrainRect(frame, [[[self window] screen] visibleFrame]);
+    frame = SKConstrainRect(frame, [([[self window] screen] ?: [NSScreen 
mainScreen]) visibleFrame]);
     
     [self 
setWindowFrameAutosaveNameOrCascade:SKSnapshotWindowFrameAutosaveName];
     [[self window] setFrame:NSIntegralRect(frame) display:NO animate:NO];


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

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to