Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: ui/chromeos/touch_exploration_controller.cc

Issue 334223007: Fix multi-finger click no entry bug in TouchExplorationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_tap
Patch Set: rebased Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/chromeos/touch_exploration_controller.cc
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index 25fd15be691d4930e1ecc2eae4220bd1189ff624..a253c828a4efcfba636b5351be792f202a2ef7c1 100644
--- a/ui/chromeos/touch_exploration_controller.cc
+++ b/ui/chromeos/touch_exploration_controller.cc
@@ -235,11 +235,12 @@ ui::EventRewriteStatus TouchExplorationController::InDoubleTapPressed(
if (current_touch_ids_.size() != 0)
return EVENT_REWRITE_DISCARD;
- // Rewrite at location of last touch exploration.
+ // Rewrite release at location of last touch exploration with the same
+ // id as the prevoius press.
rewritten_event->reset(
new ui::TouchEvent(ui::ET_TOUCH_RELEASED,
last_touch_exploration_->location(),
- event.touch_id(),
+ initial_press_->touch_id(),
event.time_stamp()));
(*rewritten_event)->set_flags(event.flags());
ResetToNoFingersDown();
@@ -353,6 +354,11 @@ ui::EventRewriteStatus TouchExplorationController::InTouchExploreSecondPress(
if (current_touch_ids_.size() != 1)
return EVENT_REWRITE_DISCARD;
+ // Continue to release the touch only if the touch explore finger is the
+ // only finger remaining.
+ if (current_touch_ids_.size() != 1)
+ return EVENT_REWRITE_DISCARD;
+
// Rewrite at location of last touch exploration.
rewritten_event->reset(
new ui::TouchEvent(ui::ET_TOUCH_RELEASED,
@@ -446,7 +452,8 @@ void TouchExplorationController::VlogEvent(const ui::TouchEvent& touch_event,
VLOG(0) << "\n Function name: " << function_name
<< "\n Event Type: " << type
<< "\n Location: " << location.ToString()
- << "\n Touch ID: " << touch_id;
+ << "\n Touch ID: " << touch_id
+ << "\n Number of fingers down: " << current_touch_ids_.size();
prev_event_.reset(new TouchEvent(touch_event));
}
}

Powered by Google App Engine
This is Rietveld 408576698