From 4933e54dedb3a15a1adfa6337a3f53b752dd8f33 Mon Sep 17 00:00:00 2001 From: alexm Date: Sun, 14 Mar 2004 18:46:01 +0000 Subject: [PATCH] (-hitTest:): Don't require that the point is inside our super view if we don't have a super view. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18845 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSView.m | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d830370c1..9ed56b3ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-14 19:42 Alexander Malmberg + + * Source/NSView.m (-hitTest:): Don't require that the point is + inside our super view if we don't have a super view. + 2004-03-14 19:29 Alexander Malmberg * Source/NSTableView.m (-mouseDown:): Send the action for simple diff --git a/Source/NSView.m b/Source/NSView.m index e620e977c..a2515e59f 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -2612,8 +2612,13 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level) unsigned count; NSView *v = nil, *w; - /* If not within our frame then it can't be a hit */ - if (![_super_view mouse: aPoint inRect: _frame]) + /* + If not within our frame then it can't be a hit. + + As a special case, always assume that it's a hit if our _super_view is nil, + ie. if we're the top-level view in a window. + */ + if (_super_view && ![_super_view mouse: aPoint inRect: _frame]) return nil; p = [self convertPoint: aPoint fromView: _super_view];