[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix, NSWindow, initWithContentRect...
From: |
Georg Fleischmann |
Subject: |
Fix, NSWindow, initWithContentRect... |
Date: |
Fri, 27 Jul 2001 23:33:29 +0200 |
Hi,
here is a little patch for NSWindows -initWithContentRect... to constrain the
window frame to the screen. Otherwise a newly created window would never be
checked against the screen.
Georg
2001-07-27 Georg Fleischmann
* gui/Source/NSWindow.m
[NSWindow initWithContentRect:styleMask:backing:defer:screen:]:
constrain frame rect to screen
diff -u gui/Source/NSWindow.m.old gui/Source/NSWindow.m
--- gui/Source/NSWindow.m.old Fri Jul 27 23:09:12 2001
+++ gui/Source/NSWindow.m Fri Jul 27 23:07:56 2001
@@ -677,6 +677,7 @@
_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);
- Fix, NSWindow, initWithContentRect...,
Georg Fleischmann <=