Hi Fred, On 2009-12-09, at 3:24 PM, Fred Kiefer wrote:
> Hans Baier schrieb: >> Author: hansfbaier >> Date: Tue Dec 8 08:55:39 2009 >> New Revision: 29106 >> >> URL: http://svn.gna.org/viewcvs/gnustep?rev=29106&view=rev >> Log: >> * Source/NSColorWell.m (-mouseDragged:, -mouseDown:): Applied patch from >> Eric Wasylishen to activate it on click inside the colored rectangle (same >> behavior as in OS X) >> >> Modified: >> libs/gui/trunk/ChangeLog >> libs/gui/trunk/Source/NSColorWell.m > > I like this patch in general, what I dislike is the global variable that > gets used for the last mouse down position. Looking at the code I am > very sure that this wont lead to any side effects, still it is the wrong > way to code this. I would prefer that we come up with a better > implementation for this feature. > I agree, the global variable is ugly. I did some more investigation yesterday, and decided it would be best to use a mouse-tracking loop in mouseDown and eliminate the global variable. OS X appears to do this as well. I'm working on a new patch which fixes a bunch of little interaction details related to NSColorWell and NSColorPanel: - activation of the well should really happen on mouseUp, not mouseDown - non-bordered NSColorWells shouldn't be able to be activated by clicking - non-bordered NSColorWells should start a drag operation upon mouseDown - disabled NSColorWells shouldn't accept colours being dropped on them - dropping a colour on the well inside the NSColorPanel should also update the active NSColorWell I just want to do a bit more testing, and I'll post the patch later tonight :-) Regards, Eric _______________________________________________ Gnustep-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnustep-dev
