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

Unified Diff: ui/app_list/presenter/app_list_presenter_impl.cc

Issue 2234233002: Enable ash window cycle UI by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky review Created 4 years, 4 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/presenter/app_list_presenter_impl.cc
diff --git a/ui/app_list/presenter/app_list_presenter_impl.cc b/ui/app_list/presenter/app_list_presenter_impl.cc
index 572528b3a3eb6e808afac5c9fc400922067f9a98..cd181d1657ed606e57ce605f0824b4b262a8eb1d 100644
--- a/ui/app_list/presenter/app_list_presenter_impl.cc
+++ b/ui/app_list/presenter/app_list_presenter_impl.cc
@@ -80,12 +80,14 @@ void AppListPresenterImpl::Dismiss() {
is_visible_ = false;
- // Our widget is currently active. When the animation completes we'll hide
- // the widget, changing activation. If a menu is shown before the animation
- // completes then the activation change triggers the menu to close. By
- // deactivating now we ensure there is no activation change when the
- // animation completes and any menus stay open.
- view_->GetWidget()->Deactivate();
+ // The dismissal may have occurred in response to the app list losing
+ // activation. Otherwise, our widget is currently active. When the animation
+ // completes we'll hide the widget, changing activation. If a menu is shown
+ // before the animation completes then the activation change triggers the menu
+ // to close. By deactivating now we ensure there is no activation change when
+ // the animation completes and any menus stay open.
+ if (view_->GetWidget()->IsActive())
+ view_->GetWidget()->Deactivate();
presenter_delegate_->OnDismissed();
ScheduleAnimation();
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698