CHG: [touch] allow generic multi-touch swipes #2483

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Owner

koying commented Mar 22, 2013

This allows generic multi-touch swipe detection (to match "Back" from "system/keymaps/touchscreen.xml").

Not sure it's foolproof, though...

@ghost ghost assigned Montellese Mar 22, 2013

Owner

Montellese commented Mar 25, 2013

This would require some extra logic that makes sure that all the swipe gestures are done in the same direction etc. But it might actually work with some small additional changes. I'll take a closer look.

Owner

koying commented Mar 26, 2013

Yeah, very crude and only works on Android because of the index/id confusion/relation exposed in #2482.
On another platform with random id's, this won't work

This one will probably be obsoleted by a gesture rework, but works for me on Android for the moment.

Owner

Montellese commented Mar 29, 2013

I looked at the code again and noticed two things:

  • Wouldn't it be better to count the number of touches in OnTouchDown() and OnTouchUp() instead of using "index + 1"?
  • I don't think the logic is 100% correct because OnTouchMove() will only be called for the pointer with index 0 so all the checks for the swipe direction etc will only be done for that pointer. The other pointer is completely ignored so you could touch down two fingers but only use one for swiping and the result would be the detection of a two-finger swipe. You could even do two swipes in opposite directions and it would still be recognised as a two-finger swipe in the direction of the primary pointer.
Owner

Montellese commented Mar 29, 2013

21cee17 works for me and also takes care of the two points I mentioned before i.e. with that code it's not possible to detect a two-finger swipe gesture if the two fingers/pointers move in different directions. Should I queue that one up as a PR and close this one?

Owner

koying commented Mar 29, 2013

Sure. Mine was really quick and dirty ;-)
Le 29 mars 2013 14:57, "Sascha Montellese" notifications@github.com a
écrit :

21cee1721cee17 for me and also takes care of the two points I mentioned before i.e.
with that code it's not possible to detect a two-finger swipe gesture if
the two fingers/pointers move in different directions. Should I queue that
one up as a PR and close this one?


Reply to this email directly or view it on GitHubhttps://github.com/xbmc/xbmc/pull/2483#issuecomment-15641661
.

Owner

Montellese commented Mar 29, 2013

Closing in favour of #2514.

@Montellese Montellese closed this Mar 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment