Index: Source/NSColorWell.m =================================================================== --- Source/NSColorWell.m (revision 29096) +++ Source/NSColorWell.m (working copy) @@ -46,6 +46,8 @@ static NSString *GSColorWellDidBecomeExclusiveNotification = @"GSColorWellDidBecomeExclusiveNotification"; +static NSPoint _lastMouseDownPoint; + @implementation NSColorWell /* @@ -289,17 +291,12 @@ // if ([self isEnabled]) { - NSPoint point = [self convertPoint: [theEvent locationInWindow] - fromView: nil]; + _lastMouseDownPoint = + [self convertPoint: [theEvent locationInWindow] + fromView: nil]; - if ([self mouse: point inRect: _wellRect]) + if (_is_active == NO) { - [NSColorPanel dragColor: _the_color - withEvent: theEvent - fromView: self]; - } - else if (_is_active == NO) - { [self activate: YES]; } else @@ -309,6 +306,19 @@ } } +- (void) mouseDragged: (NSEvent *)theEvent +{ + if ([self isEnabled]) + { + if ([self mouse: _lastMouseDownPoint inRect: _wellRect]) + { + [NSColorPanel dragColor: _the_color + withEvent: theEvent + fromView: self]; + } + } +} + - (BOOL) performDragOperation: (id )sender { NSPasteboard *pb = [sender draggingPasteboard];