[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSView bug ?
From: |
Pierre-Yves Rivaille |
Subject: |
NSView bug ? |
Date: |
Sun, 28 Jan 2001 17:00:21 +0100 (MET) |
hi,
I've located a bug inside NSView.m, which caused a mouseDown event to be
sent to an incorrect subview.
To be more precise :
at line 2157:
- (BOOL) mouse: (NSPoint)aPoint inRect: (NSRect)aRect
{
if (aPoint.x < aRect.origin.x)
return NO;
if (aPoint.y < aRect.origin.y)
return NO;
if (aPoint.x > (aRect.origin.x + aRect.size.width))
return NO;
if (aPoint.y > (aRect.origin.y + aRect.size.height))
return NO;
return YES;
}
should be
- (BOOL) mouse: (NSPoint)aPoint inRect: (NSRect)aRect
{
if (aPoint.x < aRect.origin.x)
return NO;
if (aPoint.y < aRect.origin.y)
return NO;
if (aPoint.x >= (aRect.origin.x + aRect.size.width))
return NO;
if (aPoint.y >= (aRect.origin.y + aRect.size.height))
return NO;
return YES;
}
( I was surprised because this function is prefectly implemented in
NSMouseInRect. But NSView doesn't call the NSMouseInRect probably because
of speed issues.)
Can anyone submit the attached patch (which contains nothing more that the
described change) to CVS ?
bye,
Pierre-Yves Rivaille
NSView.m.20012801.patch
Description: Text document
- NSView bug ?,
Pierre-Yves Rivaille <=