• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: doubleClick slop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >doubleClick slop? (From: Murat Konar <email@hidden>)
 >Re: doubleClick slop? (From: "I. Savant" <email@hidden>)
 >Re: doubleClick slop? (From: Murat Konar <email@hidden>)
 >Re: doubleClick slop? (From: Michael Watson <email@hidden>)
 >Re: doubleClick slop? (From: Murat Konar <email@hidden>)
 >Re: doubleClick slop? (From: Matthew Xavier Mora <email@hidden>)
 >Re: doubleClick slop? (From: Murat Konar <email@hidden>)

  • Prev by Date: Re: Re : Total number pages being printed
  • Next by Date: Quartz + NSWindow
  • Previous by thread: Re: doubleClick slop?
  • Next by thread: Re: doubleClick slop?
  • Index(es):
    • Date
    • Thread