From e9e1827d77681e94fe1b81ff1781f9e556b3ead7 Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Tue, 23 May 2006 21:15:14 +0000 Subject: [PATCH] =?UTF-8?q?Small=20patch=20to=20NSTabView.=20by=20Andreas?= =?UTF-8?q?=20H=C3=B6schler.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22976 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Source/NSTabView.m | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) 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])