Commit e5e07ff0 authored by Qiang Xu's avatar Qiang Xu Committed by Commit Bot

cros: reset autoclick ring when SetEnabled(false)

Bug: 818364
Test: manual test
Change-Id: I2ca24231dd40478e3ad269d04bde02b613073fc3
Reviewed-on: https://chromium-review.googlesource.com/966490Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/heads/master@{#544081}
parent 3fba6c35
......@@ -99,12 +99,12 @@ void AutoclickControllerImpl::SetEnabled(bool enabled) {
return;
enabled_ = enabled;
if (enabled_) {
if (enabled_)
Shell::Get()->AddPreTargetHandler(this);
autoclick_controller_common_->CancelAutoclick();
} else {
else
Shell::Get()->RemovePreTargetHandler(this);
}
autoclick_controller_common_->CancelAutoclick();
}
bool AutoclickControllerImpl::IsEnabled() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment