Re: doubleClick slop?
Re: doubleClick slop?
- Subject: Re: doubleClick slop?
- From: Murat Konar <email@hidden>
- Date: Fri, 20 Apr 2007 15:18:49 -0700
For the benefit of future generations who might also be seeking the
answer to this question of enormous import :-)
I found a thread on the Carbon Dev list dealing on this very topic.
<http://lists.apple.com/archives/carbon-dev/2006/Feb/msg00241.html>
Unfortunately, there are no answers there either (plenty of opinions
though). It would appear that there is no API to get what I'm after.
I'll file an enhancement request.
In the meantime, I have determined empirically that at least on my
machine (PowerMac G4, Mac OS 10.4.9), for a click to be considered a
double click, the x and y coords of the second click's mouseDown must
be within 12 pixels of the x and y coords respectively of the first
click's mouseUp (of course the time interval between mouseDown of the
second click and the mouseUp of the first click must be within the
double click time threshold).
In pseudo code:
if ( abs(firstClick.mouseUp.x - secondClick.mouseDown.x) <= 12 &&
abs(firstClick.mouseUp.y - secondClick.mouseDown.y) <= 12 &&
abs(firstClick.time- secondClick.time) < GetDblTime()
)
{
// double click
}
_murat
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden