Commit 37ab908e authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

macviews: reset closure animation on ReallyAccept

Accept() can be called more than once on the same MenuController, via context
menus; in this situation, it's important to clear the animation so that input
events get handled after the animation completes.

Bug: 833048
Change-Id: Id3ac92ce91e78b57f2120d4527e35e597ea03067
Reviewed-on: https://chromium-review.googlesource.com/1012876Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551410}
parent 90da8728
......@@ -1493,6 +1493,11 @@ void MenuController::Accept(MenuItemView* item, int event_flags) {
void MenuController::ReallyAccept(MenuItemView* item, int event_flags) {
DCHECK(IsBlockingRun());
result_ = item;
#if defined(OS_MACOSX)
// Reset the closure animation since it's now finished - this also unblocks
// input events for the menu.
menu_closure_animation_.reset();
#endif
if (item && !menu_stack_.empty() &&
!item->GetDelegate()->ShouldCloseAllMenusOnExecute(item->GetCommand())) {
SetExitType(EXIT_OUTERMOST);
......
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