We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1625

Summary: Add an event for double clicks
Product: SDL Reporter: Sik <sik.the.hedgehog>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: philipp.wiesemann
Version: HG 2.0   
Hardware: All   
OS: All   

Description Sik 2012-10-21 10:28:07 UTC
I suggest adding an event for when the user performs a double click. Should be self-explanatory. Whenever possible, the double click event should respect the system settings for the maximum delay and distances allowed (e.g. by using the OS's own events), while elsewhere it may have to be faked.

For when it's faked, do you think a maximum delay of 500ms and a maximum distance of 1% of the screen resolution (take the shortest dimension) are good enough?

PS: should this be "enhancement" or "API change"?
Comment 1 Philipp Wiesemann 2014-01-30 22:59:17 UTC
A "clicks" field was added for mouse button events here:
https://hg.libsdl.org/SDL/rev/658b461d81be

I guess this will be part of SDL 2.0.2 (although not listed in WhatsNew.txt yet).
Comment 2 Sam Lantinga 2014-03-01 18:36:35 UTC
Yup, I'll add it to the WhatsNew.txt file today.