Commit a4c343c8 authored by Min Chen's avatar Min Chen Committed by Commit Bot

Cancel menu showing animation only if menu is opened.

Bug: 826005
Change-Id: I237dbf4ae50b02a225110fa72dc0bb0c0127535f
Reviewed-on: https://chromium-review.googlesource.com/993755
Commit-Queue: Min Chen <minch@chromium.org>
Reviewed-by: default avatarDan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547854}
parent 1bf14974
...@@ -260,7 +260,8 @@ void PowerButtonController::OnPowerButtonEvent( ...@@ -260,7 +260,8 @@ void PowerButtonController::OnPowerButtonEvent(
// Cancel the menu animation if it's still ongoing when the button is // Cancel the menu animation if it's still ongoing when the button is
// released on a clamshell device. // released on a clamshell device.
if (!ShouldTurnScreenOffForTap() && !show_menu_animation_done_) { if (!ShouldTurnScreenOffForTap() && IsMenuOpened() &&
!show_menu_animation_done_) {
static_cast<PowerButtonMenuScreenView*>(menu_widget_->GetContentsView()) static_cast<PowerButtonMenuScreenView*>(menu_widget_->GetContentsView())
->ScheduleShowHideAnimation(false); ->ScheduleShowHideAnimation(false);
} }
......
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