~chasedouglas/grail/work-in-progress

« back to all changes in this revision

Viewing changes to src/v3/slice.cpp

  • Committer: Chase Douglas
  • Date: 2012-03-19 16:55:49 UTC
  • mfrom: (199.1.5 gesture-end-fix)
  • Revision ID: chase.douglas@ubuntu.com-20120319165549-n0orytbxe1rd0a3x
Merge fixes for atomic gesture timeout handling and gesture end handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
      touches_(touches),
56
56
      time_(frame_event_get_time(event)),
57
57
      state_(UGGestureStateBegin),
 
58
      physically_ended_(false),
58
59
      original_center_x_(0),
59
60
      original_center_y_(0),
60
61
      original_radius_(0),
96
97
      touches_(prev->touches_),
97
98
      time_(frame_event_get_time(event_)),
98
99
      state_(end ? UGGestureStateEnd : UGGestureStateUpdate),
 
100
      physically_ended_(end ? true : prev->physically_ended_),
99
101
      original_center_x_(prev->original_center_x_),
100
102
      original_center_y_(prev->original_center_y_),
101
103
      original_radius_(prev->original_radius_),
131
133
      touches_(touches),
132
134
      time_(frame_event_get_time(event)),
133
135
      state_(UGGestureStateUpdate),
 
136
      physically_ended_(prev->physically_ended_),
134
137
      original_center_x_(prev->original_center_x_),
135
138
      original_center_y_(prev->original_center_y_),
136
139
      original_radius_(prev->original_radius_),
414
417
  unsigned int touches_min = subscription->touches_min();
415
418
  if ((!touches_min && num_active_touches < touches_start) ||
416
419
      (touches_min && num_active_touches < touches_min))
417
 
    state_ = UGGestureStateEnd;
 
420
    physically_ended_ = true;
418
421
}
419
422
 
420
423
/**
477
480
      CumulativeTime() < subscription.tap().timeout &&
478
481
      CumulativeDrag2() < (subscription.tap().threshold *
479
482
                           subscription.tap().threshold) &&
480
 
      state_ == UGGestureStateEnd)
 
483
      physically_ended_)
481
484
    recognized_ |= UGGestureTypeTap;
482
485
 
483
486
  if (subscription.mask() & UGGestureTypeTouch)