Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly compute mouse.Msec time stamp #11

Merged
merged 1 commit into from
Feb 19, 2019
Merged

Conversation

fhs
Copy link
Contributor

@fhs fhs commented Feb 19, 2019

The time stamp should be in milliseconds, so take system time in
nanoseconds, convert to milliseconds and take the lower 32-bits.

This makes Edwood correctly detect double-clicks.
If the difference between consecutive time stamps is less
than 500 milliseconds, Edwood interprets it as a double-click.

The time stamp should be in milliseconds, so take system time in
nanoseconds, convert to milliseconds and take the lower 32-bits.

This makes Edwood correctly detect double-clicks.
If the difference between consecutive time stamps is less
than 500 milliseconds, Edwood interprets it as a double-click.
Copy link
Owner

@ktye ktye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember, if there are double click events in duit, that could be broken.
But if this is what libdraw expects, we should use it.

For the record: there is also shiny/gesture that detect double clicks (and long clicks, ...).

@ktye ktye merged commit 718affc into ktye:master Feb 19, 2019
@fhs fhs deleted the mouse-msec branch February 19, 2019 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants