Skip to content

Not responding to taps from Mac Trackpad #384

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

Closed
KritR opened this issue Apr 18, 2015 · 11 comments
Closed

Not responding to taps from Mac Trackpad #384

KritR opened this issue Apr 18, 2015 · 11 comments
Labels
Milestone

Comments

@KritR
Copy link

KritR commented Apr 18, 2015

Half the taps on a Mac trackpad are not registering. I am not doing a full click but a tap on the trackpad, which all other applications are responding to.

@mitchmindtree
Copy link
Contributor

@SkeletonSlayerz

Do full clicks still work?
Is this occurring in the all_widgets.rs example or in your own code?

The all_widgets.rs example uses glutin_window as a backend - it could be possible that it is not properly registering trackpad taps? It might even be that glutin doesn't yet expose this. @bvssvni any ideas?

@bvssvni bvssvni added the bug label Apr 19, 2015
@KritR
Copy link
Author

KritR commented Apr 19, 2015

@mitchmindtree

Full Clicks do work.
Currently I have tested both examples(all_widgets.rs || counter.rs) which are both exhibiting the problem.

@KritR
Copy link
Author

KritR commented Apr 19, 2015

@mitchmindtree

I don't think glutin itself is the problem here. I have run the glutin examples and they seem to be responding to my clicks just fine.

@mitchmindtree
Copy link
Contributor

@SkeletonSlayerz Ok, I have quite a few other issues to address first, but I will test this and have a go at fixing it soon.

@KritR
Copy link
Author

KritR commented Apr 19, 2015

@mitchmindtree

Sure take your time with it.

@dylanede
Copy link

I'm also getting this problem.

@mitchmindtree
Copy link
Contributor

Ok, so I think this problem occurs because both the "press" and "release" events are sent within the duration of a single frame, and at the moment most widgets just check whether the mouse button is Up or Down each frame - we should probably be checking events themselves rather than just the current state of the mouse for this reason.

@mitchmindtree mitchmindtree added this to the 1.0.0 milestone Jul 28, 2015
@mitchmindtree
Copy link
Contributor

I think the easiest way to solve this for now would be to: in the case that a tap occurs and both "press" and "release" are sent at once, delay handling the "release" until the next update. This should just be a temporary fix though, as we want response to be as fast as possible.

@dylanede
Copy link

Am I correct in saying that this bug is due to a fundamental flaw in the architecture of Conrod? All interactions are based on checking and comparing states, with each widget checking the global input state and storing its own history of that state, when really an event-driven model should be used, with widgets subscribing to events (such as mouse down, mouse up, frame update, etc.). Most other GUI systems in existence use an event model, if I'm not mistaken. The current architecture, as shown by this bug, is liable to miss transient states, i.e. state changes that very quickly revert to the last state, such as a trackpad tap - this could possibly happen with devices other than Mac trackpads, such as other trackpads, or touch screen devices.

@mitchmindtree
Copy link
Contributor

@dylanede yes, I think we can solve it quite easily with #569 by providing the ordered events that have occurred between updates in an ordered Vec

@mitchmindtree
Copy link
Contributor

Ok, the fundamental problem should be solved by #684, which moves conrod over to an event-based user input system. Still need to move most widgets over to the new system and I've a few ideas for providing some more higher-level events, though these changes shouldn't take too long.

Thanks for raising this issue, it was definitely the first sign that conrod's old user input handling was flawed! The new system should be a big improvement :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants