diff --git a/ChangeLog b/ChangeLog index a7dff589f..665cb1587 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-05-23 Fred Kiefer + + * Source/NSTabView.m (-tabViewItemAtPoint:, -mouseDown:): Moved + conversion of point with view transformation into the mouseDown: + method to be compatible with Cocoa. + Patch by Andreas Höschler . + 2006-05-20 18:25 Gregory John Casamento * Source/GSNibCompatibility.m diff --git a/Source/NSTabView.m b/Source/NSTabView.m index e58ce93f3..795780f54 100644 --- a/Source/NSTabView.m +++ b/Source/NSTabView.m @@ -700,13 +700,15 @@ // Event handling. +/* + * Find the tab view item containing the NSPoint point. This point + * is expected to be alreay in the coordinate system of the tab view. + */ - (NSTabViewItem*) tabViewItemAtPoint: (NSPoint)point { int howMany = [_items count]; int i; - point = [self convertPoint: point fromView: nil]; - for (i = 0; i < howMany; i++) { NSTabViewItem *anItem = [_items objectAtIndex: i]; @@ -720,7 +722,8 @@ - (void) mouseDown: (NSEvent *)theEvent { - NSPoint location = [theEvent locationInWindow]; + NSPoint location = [self convertPoint: [theEvent locationInWindow] + fromView: nil]; NSTabViewItem *anItem = [self tabViewItemAtPoint: location]; if (anItem != nil && ![anItem isEqual: _selected])