| Index: ash/display/mouse_cursor_event_filter.cc
|
| diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc
|
| index 469db416c15aa664b9d6f859830ff0a6ea29da36..e725e43e00e26ef52f7172204589e4535bb3ce57 100644
|
| --- a/ash/display/mouse_cursor_event_filter.cc
|
| +++ b/ash/display/mouse_cursor_event_filter.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "ash/display/display_controller.h"
|
| #include "ash/display/shared_display_edge_indicator.h"
|
| +#include "ash/screen_ash.h"
|
| #include "ash/shell.h"
|
| #include "ash/wm/coordinate_conversion.h"
|
| #include "ash/wm/cursor_manager.h"
|
| @@ -56,7 +57,7 @@ void MouseCursorEventFilter::ShowSharedEdgeIndicator(
|
| drag_source_root_ = from;
|
|
|
| DisplayLayout::Position position = Shell::GetInstance()->
|
| - display_controller()->default_display_layout().position;
|
| + display_controller()->GetCurrentDisplayLayout().position;
|
| if (position == DisplayLayout::TOP || position == DisplayLayout::BOTTOM)
|
| UpdateHorizontalIndicatorWindowBounds();
|
| else
|
| @@ -163,13 +164,10 @@ bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(
|
| void MouseCursorEventFilter::UpdateHorizontalIndicatorWindowBounds() {
|
| bool from_primary = Shell::GetPrimaryRootWindow() == drag_source_root_;
|
|
|
| - aura::DisplayManager* display_manager =
|
| - aura::Env::GetInstance()->display_manager();
|
| - const gfx::Rect& primary_bounds = display_manager->GetDisplayAt(0)->bounds();
|
| - const gfx::Rect& secondary_bounds =
|
| - display_manager->GetDisplayAt(1)->bounds();
|
| + const gfx::Rect& primary_bounds = gfx::Screen::GetPrimaryDisplay().bounds();
|
| + const gfx::Rect& secondary_bounds = ScreenAsh::GetSecondaryDisplay().bounds();
|
| DisplayLayout::Position position = Shell::GetInstance()->
|
| - display_controller()->default_display_layout().position;
|
| + display_controller()->GetCurrentDisplayLayout().position;
|
|
|
| src_indicator_bounds_.set_x(
|
| std::max(primary_bounds.x(), secondary_bounds.x()));
|
| @@ -192,13 +190,11 @@ void MouseCursorEventFilter::UpdateHorizontalIndicatorWindowBounds() {
|
|
|
| void MouseCursorEventFilter::UpdateVerticalIndicatorWindowBounds() {
|
| bool in_primary = Shell::GetPrimaryRootWindow() == drag_source_root_;
|
| - aura::DisplayManager* display_manager =
|
| - aura::Env::GetInstance()->display_manager();
|
| - const gfx::Rect& primary_bounds = display_manager->GetDisplayAt(0)->bounds();
|
| - const gfx::Rect& secondary_bounds =
|
| - display_manager->GetDisplayAt(1)->bounds();
|
| +
|
| + const gfx::Rect& primary_bounds = gfx::Screen::GetPrimaryDisplay().bounds();
|
| + const gfx::Rect& secondary_bounds = ScreenAsh::GetSecondaryDisplay().bounds();
|
| DisplayLayout::Position position = Shell::GetInstance()->
|
| - display_controller()->default_display_layout().position;
|
| + display_controller()->GetCurrentDisplayLayout().position;
|
|
|
| int upper_shared_y = std::max(primary_bounds.y(), secondary_bounds.y());
|
| int lower_shared_y = std::min(primary_bounds.bottom(),
|
|
|