| 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 852a16bfa43d7a5717759015a2c164fa7658144f..0c48913317c96ef0f496c7d57595827e49a13309 100644
|
| --- a/ui/app_list/presenter/app_list_presenter_impl.cc
|
| +++ b/ui/app_list/presenter/app_list_presenter_impl.cc
|
| @@ -13,6 +13,7 @@
|
| #include "ui/aura/window.h"
|
| #include "ui/compositor/layer.h"
|
| #include "ui/compositor/scoped_layer_animation_settings.h"
|
| +#include "ui/display/screen.h"
|
| #include "ui/views/widget/widget.h"
|
|
|
| namespace app_list {
|
| @@ -120,7 +121,7 @@ void AppListPresenterImpl::SetAppList(mojom::AppListPtr app_list) {
|
| app_list_ = std::move(app_list);
|
| // Notify the app list interface of the current [target] visibility.
|
| app_list_->OnTargetVisibilityChanged(GetTargetVisibility());
|
| - app_list_->OnVisibilityChanged(IsVisible());
|
| + app_list_->OnVisibilityChanged(IsVisible(), GetDisplayId());
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -185,6 +186,15 @@ void AppListPresenterImpl::ScheduleAnimation() {
|
| widget->SetBounds(target_bounds);
|
| }
|
|
|
| +int64_t AppListPresenterImpl::GetDisplayId() {
|
| + views::Widget* widget = view_ ? view_->GetWidget() : nullptr;
|
| + if (!widget)
|
| + return display::kInvalidDisplayId;
|
| + return display::Screen::GetScreen()
|
| + ->GetDisplayNearestWindow(widget->GetNativeView())
|
| + .id();
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // AppListPresenterImpl, aura::client::FocusChangeObserver implementation:
|
|
|
| @@ -234,7 +244,7 @@ void AppListPresenterImpl::OnWidgetVisibilityChanged(views::Widget* widget,
|
| bool visible) {
|
| DCHECK_EQ(view_->GetWidget(), widget);
|
| if (app_list_)
|
| - app_list_->OnVisibilityChanged(visible);
|
| + app_list_->OnVisibilityChanged(visible, GetDisplayId());
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|