Revision: 5067
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5067&view=rev
Author:   hofman
Date:     2008-12-16 15:59:45 +0000 (Tue, 16 Dec 2008)

Log Message:
-----------
Reset frame of full screen window after moving it. This may happen when moving 
the fullscreen in the Spaces overview.

Modified Paths:
--------------
    trunk/SKMainWindowController_UI.m

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2008-12-16 12:20:16 UTC (rev 5066)
+++ trunk/SKMainWindowController_UI.m   2008-12-16 15:59:45 UTC (rev 5067)
@@ -255,10 +255,9 @@
 
 - (void)windowDidChangeScreen:(NSNotification *)notification {
     if ([[notification object] isEqual:[self window]]) {
+        NSScreen *screen = [fullScreenWindow screen];
+        [fullScreenWindow setFrame:[screen frame] display:NO];
         if ([self isFullScreen]) {
-            NSScreen *screen = [fullScreenWindow screen];
-            [fullScreenWindow setFrame:[screen frame] display:NO];
-            
             if ([[leftSideWindow screen] isEqual:screen] == NO) {
                 [leftSideWindow orderOut:self];
                 [leftSideWindow moveToScreen:screen];
@@ -271,14 +270,38 @@
                 [rightSideWindow collapse];
                 [rightSideWindow orderFront:self];
             }
-        } else if ([self isPresentation]) {
-            [fullScreenWindow setFrame:[[fullScreenWindow screen] frame] 
display:NO];
         }
         [pdfView layoutDocumentView];
         [pdfView setNeedsDisplay:YES];
     }
 }
 
+- (void)windowDidMove:(NSNotification *)notification {
+    if ([[notification object] isEqual:[self window]] && [[notification 
object] isEqual:fullScreenWindow]) {
+        NSScreen *screen = [fullScreenWindow screen];
+        NSRect screenFrame = [screen frame];
+        if (NSEqualRects(screenFrame, [fullScreenWindow frame]) == NO) {
+            [fullScreenWindow setFrame:screenFrame display:NO];
+            if ([self isFullScreen]) {
+                if ([[leftSideWindow screen] isEqual:screen] == NO) {
+                    [leftSideWindow orderOut:self];
+                    [leftSideWindow moveToScreen:screen];
+                    [leftSideWindow collapse];
+                    [leftSideWindow orderFront:self];
+                }
+                if ([[rightSideWindow screen] isEqual:screen] == NO) {
+                    [rightSideWindow orderOut:self];
+                    [leftSideWindow moveToScreen:screen];
+                    [rightSideWindow collapse];
+                    [rightSideWindow orderFront:self];
+                }
+            }
+            [pdfView layoutDocumentView];
+            [pdfView setNeedsDisplay:YES];
+        }
+    }
+}
+
 #pragma mark NSTableView delegate protocol
 
 - (void)tableViewSelectionDidChange:(NSNotification *)aNotification {


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

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to