From 04b9709a937bce3850b8e547428aa7c07872c8d6 Mon Sep 17 00:00:00 2001 From: nico Date: Fri, 10 Mar 2000 02:18:15 +0000 Subject: [PATCH] Fixed bug in dragging; avoid redrawing when ignoring mouse press git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6244 72102866-910b-0410-8b05-ffd578937521 --- Source/NSSplitView.m | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Source/NSSplitView.m b/Source/NSSplitView.m index e8ec26cf5..e33840517 100644 --- a/Source/NSSplitView.m +++ b/Source/NSSplitView.m @@ -94,16 +94,17 @@ { v = [subs objectAtIndex: i]; r = [v frame]; - /* if the click is inside of a subview, return. - this should never happen */ + /* if the click is inside of a subview, return. this should + happen only if a subview has leaked a mouse down to next + responder */ if (NSPointInRect(p, r)) { - NSLog(@"NSSplitView got mouseDown that should have gone to subview"); + NSLog(@"NSSplitView got mouseDown in subview area"); goto RETURN_LABEL; } if (_isVertical == NO) { - if (NSMaxY(r) < p.y) + if (NSMaxY(r) <= p.y) { // can happen only when i>0. NSView *tempView; @@ -128,7 +129,7 @@ } else { - if (NSMinX(r) > p.x) + if (NSMinX(r) >= p.x) { offset = i; @@ -298,11 +299,12 @@ [_window invalidateCursorRectsForView: self]; -RETURN_LABEL: - [_window setAcceptsMouseMovedEvents: NO]; + [self setNeedsDisplay: YES]; [self display]; +RETURN_LABEL: + [_window setAcceptsMouseMovedEvents: NO]; } - (void) adjustSubviews