Coordinate conversion fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4598 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-07-15 17:17:56 +00:00
parent 45532bb00c
commit e43e92b68b
2 changed files with 9 additions and 6 deletions

View file

@ -2,6 +2,8 @@ Thu Jul 15 18:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSView.m: Make sure cursor and tracking rects are converted
to window coordinate system before installing them.
Coordinate conversion methods - return unchanged values if the view
is not in a window.
* Source/NSWindow.m: Don't convert cursor rects coordinates - done in
nsview.
* Headers/AppKit/NSText.h: Fix include order.

View file

@ -833,7 +833,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (!aView)
aView = [window contentView];
if (aView == self)
if (aView == self || aView == nil)
return aPoint;
NSAssert(window == [aView window], NSInvalidArgumentException);
@ -856,7 +856,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (!aView)
aView = [window contentView];
if (aView == self)
if (aView == self || aView == nil)
return aPoint;
NSAssert(window == [aView window], NSInvalidArgumentException);
@ -879,7 +879,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (!aView)
aView = [window contentView];
if (aView == self)
if (aView == self || aView == nil)
return aRect;
NSAssert(window == [aView window], NSInvalidArgumentException);
@ -907,7 +907,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (!aView)
aView = [window contentView];
if (aView == self)
if (aView == self || aView == nil)
return aRect;
NSAssert(window == [aView window], NSInvalidArgumentException);
@ -935,7 +935,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (!aView)
aView = [window contentView];
if (aView == self)
if (aView == self || aView == nil)
return aSize;
NSAssert(window == [aView window], NSInvalidArgumentException);
@ -958,7 +958,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (!aView)
aView = [window contentView];
if (aView == self)
if (aView == self || aView == nil)
return aSize;
NSAssert(window == [aView window], NSInvalidArgumentException);
@ -1754,6 +1754,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
{
GSTrackingRect *m;
if (window)
aRect = [self convertRect: aRect toView: nil];
m = [rectClass allocWithZone: NSDefaultMallocZone()];
m = [m initWithRect: aRect