bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix, NSWindow, constrain


From: Georg Fleischmann
Subject: Fix, NSWindow, constrain
Date: Mon, 30 Jul 2001 15:03:14 +0200

Hi,

I had to realize that my latest patch for NSWindow produced some problems with  
GWorkspace.
After reading the specs more carefully, the constrain should be better applied  
to the [NSWindow orderWindow:relativeTo:] method, giving off screen windows  
the chance to be placed anywhere.
I think it would be correct to remove the constrain in [NSWindow setFrame:] too.


2001-07-30  Georg Fleischmann

        * gui/Source/NSWindow.m
        [NSWindow orderWindow:relativeTo:]: constrain added
        [NSWindow initWithContentRect:styleMask:backing:defer:screen:] and
        [NSWindow setFrame:]: constrain removed


diff -u gui/Source/NSWindow.m.old gui/Source/NSWindow.m

--- gui/Source/NSWindow.m.old   Mon Jul 30 14:41:05 2001
+++ gui/Source/NSWindow.m       Mon Jul 30 14:50:40 2001
@@ -677,7 +677,6 @@
   _styleMask = aStyle;

   _frame = [NSWindow frameRectForContentRect: contentRect styleMask: aStyle];
-  _frame = [self constrainFrameRect:_frame toScreen:[self screen]];
   _minimumSize = NSMakeSize(_frame.size.width - contentRect.size.width + 1,
     _frame.size.height - contentRect.size.height + 1);
   _maximumSize = NSMakeSize (10e4, 10e4);
@@ -1140,6 +1139,7 @@
     }
   else
     {
+      _frame = [self constrainFrameRect:_frame toScreen:[self screen]];
       // create deferred window
       if(_windowNum == 0)
        {
@@ -1336,8 +1336,6 @@
 - (void) setFrame: (NSRect)frameRect display: (BOOL)flag
 {
   NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
-
-  frameRect = [self constrainFrameRect: frameRect toScreen: [self screen]];

   if (_maximumSize.width > 0 && frameRect.size.width > _maximumSize.width)
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]