Author: dpsimons
Date: Wed Apr 23 21:26:13 2014
New Revision: 37806

URL: http://svn.gna.org/viewcvs/gnustep?rev=37806&view=rev
Log:
restore correct behavior of _screenForFrame:, and fix cascadeTopLeftFromPoint: 
to correctly put window on screen if it is not on any screen

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/NSWindow.m

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSWindow.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSWindow.m?rev=37806&r1=37805&r2=37806&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSWindow.m        
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSWindow.m        Wed Apr 
23 21:26:13 2014
@@ -389,7 +389,7 @@
 */
 - (NSScreen *) _screenForFrame: (NSRect)frame
 {
-  NSInteger  largest   = -1;
+  NSInteger  largest   = 0;
   NSArray   *screens   = [NSScreen screens];
   NSInteger  index     = 0;
   NSScreen  *theScreen = nil;
@@ -1969,7 +1969,8 @@
     {
       NSScreen *screen = [NSScreen mainScreen];
       NSRect    sFrame = [screen visibleFrame];
-      topLeftPoint     = sFrame.origin;
+      topLeftPoint.x = NSMinX(sFrame);
+      topLeftPoint.y = NSMaxY(sFrame);
     }
   else if (NSEqualPoints(topLeftPoint, NSZeroPoint) == YES)
     {


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to