Chromium Code Reviews| 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()) |
|
Evan Stade
2016/08/12 22:51:58
This is necessary because otherwise Alt+Tabbing wh
|
| + view_->GetWidget()->Deactivate(); |
| presenter_delegate_->OnDismissed(); |
| ScheduleAnimation(); |