/srv/irclogs.ubuntu.com/2012/06/12/#ubuntu-touch.txt

=== MacSlow is now known as MacSlow|lunch
=== MacSlow|lunch is now known as MacSlow
cndmorning all14:14
cndbregma, dandrader: standups :)14:14
dandraderFixing tap handling in the unity patch that uses the upcoming nux with integrated geisv2.14:14
cndI'm mostly continuing research14:14
bregma*gulp* no changes14:14
cndbregma, do you think you'll get to the MP today?14:15
dandraderI'm coming to the realization that using only Touch gesture classes is the way to go, at least for Unity.14:16
dandraderspecially when dealing with taps14:16
cnddandrader, huh?14:16
cndwhy?14:16
bregmacnd, I hop to try to get to them, they have a higher priority for me today14:16
cndok14:16
dandradercnd,  The tap gesture class is super weird, as it sends only a single update and nothing else. that breaks my logic that assumes gestures have a begin, zero or more updates and a an end14:17
cnddandrader, you can change that with a geis option14:18
cndGEIS_INIT_SEND_TENTATIVE_EVENTS14:19
cndit changes the semantics of every gesture you get though14:19
dandraderand it's super trivial to check if you have a drag a tap etc from a touch gesture14:19
dandraderand using touch events the client can better reject and accept candidates14:19
cnddandrader, but then you're reimplementing grail inside of unity :)14:20
dandradercnd, some 30 lines of code from it14:21
dandraderthe "if X is beyond FOO threshold"14:21
dandraderpart14:21
cnddandrader, it sounds like you really just want the tentative events14:22
cndit essentially gives you the "touch" semantics14:22
cndas in, you get all the events from the initial touch to each touch end14:22
cndeven for a tap14:22
cndbut it still uses grail for threshold checking, so you aren't bothered with gestures that don't match your subscriptions14:23
dandraderthat might be the case, yes14:26
dandraderand that single tap gesture update is also broken as it has IsConstructionFinished == false and you never get an update saying that its construction has finished14:27
cnddandrader, ahh, that sounds like a bug :)14:29
cnddandrader, please try out the tentative events to see if it fits your needs14:29
cndif not, we need to know about it14:33
dandradercnd, sure. although I'm not sure how much work it will spare me14:33
cnddandrader, it's more about determining where utouch may have issues14:33
cndit *should* be providing this functionality14:34
cndand it *should* save you work14:34
cndif not, then that's a problem :)14:34
dandradercnd, window manipulation (with 3 fingers) in unity  for instance14:34
dandraderyou need a touch gesture to show the grab handles ASAP14:34
cnddandrader, no, you can do a drag with 0 thresholds14:35
cndtouch gestures were a hack we threw in14:35
dandraderthen you would need a grab and a pinch subscription14:35
cndyeah14:35
dandraderbut the touch gesture already gives you drag and pinch info14:35
cndbut that's just using the "hack" of touch gestures14:36
dandraderand with window manipulation there's no need to even bother with threshold checks for drags. you just move the window whenever the touch gesture moves14:36
cnddandrader, the second issue with just using touch gestures is that you have to do your own pinch checking14:37
cndrather than letting utouch tell you when a pinch has occurred14:37
cndbut admittedly, that isn't a lot of code14:37
dandradercnd,  I mean, a geis gesture event already gives you a wealth of info. all the deltas etc you might want. the only missing bit is the "if X > THRESHOLD" part. but that really trivial14:37
dandraderand it's more convenient to do such checks in your code than to reach for that plain C api (i.e. less readable) to set the thresholds you want14:38
cnddandrader, yes, it's the more trivial part of it all, but it is still relying on a code path that is essentially deprecated14:38
cndtouch gestures are equivalent to drag gestures with a threshold of 014:39
cndwe couldn't implement thresholds way back when we had to hack in touch gestures14:39
cndat this point, we shouldn't be using touch gestures because there is a better abstraction14:40
dandradercnd, btw, current unity code already does its own pinch checking :)14:40
cndand where thresholds are not 0, touch gestures are the wrong choice altogether14:40
dandrader   if (data->radius > 1.25)14:40
dandrader  {14:40
dandrader    _pinch_window->maximize(MAXIMIZE_STATE);14:40
dandrader    EndDrag();14:40
dandrader  }14:40
dandrader  else if (data->radius < 0.8)14:40
dandrader  {14:40
dandrader    _pinch_window->maximize(0);14:40
dandrader    EndDrag();14:40
dandrader  }14:40
dandradercnd,  how intuitive and straightforward is that snippet?14:41
cnddandrader, yes, but that's because a pinch for this particular use case occurs through the same gesture as the drag with 0 threshold14:41
cndimagine you didn't have drag to move the window14:41
cndyou just had pinch to maximize/unmaximize14:41
cndthere's no justification for using a touch gesture, you should be telling grail to listen for a pinch14:42
cndand setting the threshold to 0.814:42
cndthat way grail automatically rejects any touch motion that doesn't meet such a threshold14:42
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
dandradercnd,  about tentative events. So a successful gesture would have: tentative_begin, tentative_update, update and end whereas a failed one would be tentative_begin, tentative_update and tentative_end?15:16
cndyou won't get gesture events for failed gestures15:36
cndthat's part of the purpose of grail thresholds15:36
cndtentative is somewhat poorly named15:45
cndit's more that you get events that are known to be a part of a subscribed gesture, but you get all the events, including those before the gesture is recognized15:45
cndso the first events until a gesture is recognized *were* tentative events, and that's what you're asking for with the geis option15:50
dandradercnd, does it make sense to have a gesture_end with is_construction_finished=false?16:18
cnddandrader, no16:18
cndwhere are you seeing that?16:18
dandraderin geis16:19
dandraderif you do a quick tap16:19
dandraderI guess it's because the gesture ends before composition_time is passed16:19
cndcould be16:19
dandraderhmm... using GEIS_INIT_SEND_TENTATIVE_EVENTS leads to a crash in geis when I do a tap :(16:53
dandradermaybe the simplest way would be for my GeisAdapter to generate a begin and an end event out of that single tap update event...16:55
=== dandrader is now known as dandrader|lunch
=== dandrader|lunch is now known as dandrader
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
cndwhoa, it's actually cypress chips powering the macbook trackpads20:44
cndthe bcm597{4,6} chips seem to be just the data transport20:44
cndhmm... the cypress chip is merely a programmable SoC20:49
cndso Apple and/or Cypress have added touch sensing capabilities on top20:49
cndinteresting...20:51

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!