Author: gcasa
Date: Mon Aug 18 18:16:52 2014
New Revision: 38046

URL: http://svn.gna.org/viewcvs/gnustep?rev=38046&view=rev
Log:
Change -[NSWindow constrainFrameRect:toScreen:] to correct x origin if needed.

Modified:
    libs/gui/trunk/ChangeLog
    libs/gui/trunk/Source/NSWindow.m

Modified: libs/gui/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=38046&r1=38045&r2=38046&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog    (original)
+++ libs/gui/trunk/ChangeLog    Mon Aug 18 18:16:52 2014
@@ -1,3 +1,13 @@
+2014-08-18 12:14-EDT Gregory John Casamento <[email protected]>
+
+       * Source/NSWindow.m: Change code in
+       -[NSWindow constrainFrameRect:toScreen:] to contstrain
+       the X origin coordinate as well so that the window will appear
+       inside the screen if the saved coordinates are outside of the current
+       screen's range.  This can occur of the .gorm file was made on a machine
+       with a larger screen geometry than the machine it is currently running
+       on.
+
 2014-07-25  Gregory John Casamento <[email protected]>
 
        * Source/NSWindow.m: Remove code in (initWithContentRect:..) which

Modified: libs/gui/trunk/Source/NSWindow.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSWindow.m?rev=38046&r1=38045&r2=38046&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSWindow.m    (original)
+++ libs/gui/trunk/Source/NSWindow.m    Mon Aug 18 18:16:52 2014
@@ -2104,6 +2104,13 @@
   if (difference > 0)
     {
       frameRect.origin.y -= difference;
+    }
+
+  /* Adjust X origin, if needed */
+  difference = NSMaxX (frameRect) - NSMaxX (screenRect);
+  if (difference > 0)
+    {
+      frameRect.origin.x -= difference;
     }
   
   /* If the window is resizable, resize it (if needed) so that the


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

Reply via email to