Revision: 2674
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2674&view=rev
Author:   hofman
Date:     2007-08-17 03:18:26 -0700 (Fri, 17 Aug 2007)

Log Message:
-----------
Use mainScreen for fullscreen windows if the passed in screen is nil.

Modified Paths:
--------------
    trunk/SKFullScreenWindow.m
    trunk/SKNavigationWindow.m
    trunk/SKSideWindow.m

Modified: trunk/SKFullScreenWindow.m
===================================================================
--- trunk/SKFullScreenWindow.m  2007-08-16 19:55:35 UTC (rev 2673)
+++ trunk/SKFullScreenWindow.m  2007-08-17 10:18:26 UTC (rev 2674)
@@ -44,6 +44,8 @@
 @implementation SKFullScreenWindow
 
 - (id)initWithScreen:(NSScreen *)screen {
+    if (screen == nil)
+        screen = [NSScreen mainScreen];
     if (self = [self initWithContentRect:[screen frame] 
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO 
screen:screen]) {
         [self setReleasedWhenClosed:NO];
         [self setDisplaysWhenScreenProfileChanges:YES];

Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m  2007-08-16 19:55:35 UTC (rev 2673)
+++ trunk/SKNavigationWindow.m  2007-08-17 10:18:26 UTC (rev 2674)
@@ -53,6 +53,8 @@
 
 - (id)initWithPDFView:(PDFView *)pdfView {
     NSScreen *screen = [[pdfView window] screen];
+    if (screen == nil)
+        screen = [NSScreen mainScreen];
     float width = 4 * BUTTON_WIDTH + 2 * SEP_WIDTH + 2 * MARGIN;
     NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 0.5 * width, 
NSMinY([screen frame]) + OFFSET, width, BUTTON_WIDTH + 2 * MARGIN);
     if (self = [super initWithContentRect:contentRect 
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO 
screen:screen]) {

Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m        2007-08-16 19:55:35 UTC (rev 2673)
+++ trunk/SKSideWindow.m        2007-08-17 10:18:26 UTC (rev 2674)
@@ -55,6 +55,8 @@
 
 - (id)initWithMainController:(SKMainWindowController *)aController 
edge:(NSRectEdge)anEdge {
     NSScreen *screen = [[aController window] screen];
+    if (screen == nil)
+        screen = [NSScreen mainScreen];
     NSRect contentRect = [screen frame];
     if (anEdge == NSMaxXEdge)
         contentRect.origin.x = NSMaxX(contentRect) - DEFAULT_WINDOW_WIDTH;


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to