| Index: ui/views/corewm/tooltip_controller.cc
|
| diff --git a/ui/views/corewm/tooltip_controller.cc b/ui/views/corewm/tooltip_controller.cc
|
| index bd400e9c30e4c31730872009c9b795c12dbd7331..e12582ba99d3793dd34d7551d71c5dd36c195f3c 100644
|
| --- a/ui/views/corewm/tooltip_controller.cc
|
| +++ b/ui/views/corewm/tooltip_controller.cc
|
| @@ -181,6 +181,14 @@ void TooltipController::OnKeyEvent(ui::KeyEvent* event) {
|
| }
|
|
|
| void TooltipController::OnMouseEvent(ui::MouseEvent* event) {
|
| + // Ignore mouse events that coincide with the last touch event.
|
| + if (event->location() == last_touch_loc_) {
|
| + SetTooltipWindow(nullptr);
|
| +
|
| + if (tooltip_->IsVisible())
|
| + UpdateIfRequired();
|
| + return;
|
| + }
|
| switch (event->type()) {
|
| case ui::ET_MOUSE_CAPTURE_CHANGED:
|
| case ui::ET_MOUSE_EXITED:
|
| @@ -224,11 +232,10 @@ void TooltipController::OnMouseEvent(ui::MouseEvent* event) {
|
| }
|
|
|
| void TooltipController::OnTouchEvent(ui::TouchEvent* event) {
|
| - // TODO(varunjain): need to properly implement tooltips for
|
| - // touch events.
|
| // Hide the tooltip for touch events.
|
| tooltip_->Hide();
|
| SetTooltipWindow(NULL);
|
| + last_touch_loc_ = event->location();
|
| }
|
|
|
| void TooltipController::OnCancelMode(ui::CancelModeEvent* event) {
|
|
|