diff --git a/ChangeLog b/ChangeLog index 785679bcd..fa7a1de63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Jul 15 18:00:00 1999 Richard Frith-Macdonald + + * Source/NSView.m: Make sure cursor and tracking rects are converted + to window coordinate system before installing them. + * Source/NSWindow.m: Don't convert cursor rects coordinates - done in + nsview. + * Headers/AppKit/NSText.h: Fix include order. + Thu Jul 15 6:55:00 1999 Richard Frith-Macdonald * Headers/AppKit/NSAttributedString.h: new file diff --git a/Headers/gnustep/gui/NSText.h b/Headers/gnustep/gui/NSText.h index 6352d4fb7..a3fabf378 100644 --- a/Headers/gnustep/gui/NSText.h +++ b/Headers/gnustep/gui/NSText.h @@ -36,7 +36,6 @@ #include #include #include -#include @class NSString; @class NSData; @@ -44,7 +43,6 @@ @class NSColor; @class NSFont; -#if GNUSTEP typedef enum _NSTextAlignment { NSLeftTextAlignment, NSRightTextAlignment, @@ -63,7 +61,8 @@ enum { NSUpTextMovement = 0x15, NSDownTextMovement = 0x16 }; -#endif + +#include // these definitions should migrate to NSTextView when implemented diff --git a/Source/NSView.m b/Source/NSView.m index 10bf332d5..9536052d2 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -1754,6 +1754,7 @@ GSSetDragTypes(NSView* obj, NSArray *types) { GSTrackingRect *m; + aRect = [self convertRect: aRect toView: nil]; m = [rectClass allocWithZone: NSDefaultMallocZone()]; m = [m initWithRect: aRect tag: 0 @@ -1991,8 +1992,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level) userData: (void*)data assumeInside: (BOOL)flag { - NSTrackingRectTag t; - unsigned i, j; + NSTrackingRectTag t; + unsigned i, j; GSTrackingRect *m; t = 0; @@ -2005,6 +2006,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level) } ++t; + aRect = [self convertRect: aRect toView: nil]; m = [[rectClass alloc] initWithRect: aRect tag: t owner: anObject diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 8cb7b2cb6..537785f7c 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -1206,7 +1206,6 @@ static NSRecursiveLock *windowsLock; { GSTrackingRect *rects[count]; NSPoint loc = [theEvent locationInWindow]; - BOOL flipped = ((NSViewPtr)theView)->_rFlags.flipped_view; unsigned i; [tr getObjects: rects]; @@ -1218,9 +1217,9 @@ static NSRecursiveLock *windowsLock; GSTrackingRect *r = rects[i]; /* Check mouse at last point */ - last = NSMouseInRect(last_point, r->rectangle, flipped); + last = NSMouseInRect(last_point, r->rectangle, NO); /* Check mouse at current point */ - now = NSMouseInRect(loc, r->rectangle, flipped); + now = NSMouseInRect(loc, r->rectangle, NO); if ((!last) && (now)) // Mouse entered event { @@ -1297,22 +1296,15 @@ static NSRecursiveLock *windowsLock; NSPoint loc = [theEvent locationInWindow]; NSPoint lastConv; NSPoint locConv; - BOOL flipped = ((NSViewPtr)theView)->_rFlags.flipped_view; unsigned i; - /* - * Convert points from window to view coordinates. - */ - lastConv = [theView convertPoint: last_point fromView: nil]; - locConv = [theView convertPoint: loc fromView: nil]; - [tr getObjects: rects]; for (i = 0; i < count; ++i) { GSTrackingRect *r = rects[i]; - BOOL last; - BOOL now; + BOOL last; + BOOL now; if ([r isValid] == NO) continue; @@ -1320,8 +1312,8 @@ static NSRecursiveLock *windowsLock; /* * Check for presence of point in rectangle. */ - last = NSMouseInRect(lastConv, r->rectangle, flipped); - now = NSMouseInRect(locConv, r->rectangle, flipped); + last = NSMouseInRect(lastConv, r->rectangle, NO); + now = NSMouseInRect(locConv, r->rectangle, NO); // Mouse entered if ((!last) && (now))