git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4597 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-07-15 17:04:25 +00:00
parent 81b4f0f80c
commit 45532bb00c
4 changed files with 20 additions and 19 deletions

View file

@ -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

View file

@ -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))