Index: ash/wm/workspace/workspace_window_resizer.cc |
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc |
index c8e0075669dd6256504d0cfb0e216abefeb1fbd5..dfe20f8bdccea465bdfb6abbea79ffa3a33d611a 100644 |
--- a/ash/wm/workspace/workspace_window_resizer.cc |
+++ b/ash/wm/workspace/workspace_window_resizer.cc |
@@ -194,7 +194,8 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) { |
gfx::Point last_mouse_location_in_screen = last_mouse_location_; |
wm::ConvertPointToScreen(window()->parent(), &last_mouse_location_in_screen); |
const gfx::Display dst_display = |
- gfx::Screen::GetDisplayNearestPoint(last_mouse_location_in_screen); |
+ gfx::Screen::GetDisplayNearestPoint( |
+ ash::Shell::GetRootNativeView(), last_mouse_location_in_screen); |
if (dst_display.id() != |
gfx::Screen::GetDisplayNearestWindow(window()->GetRootWindow()).id()) { |
@@ -427,7 +428,8 @@ void WorkspaceWindowResizer::AdjustBoundsForMainWindow( |
gfx::Point last_mouse_location_in_screen = last_mouse_location_; |
wm::ConvertPointToScreen(window()->parent(), &last_mouse_location_in_screen); |
gfx::Display display = |
- gfx::Screen::GetDisplayNearestPoint(last_mouse_location_in_screen); |
+ gfx::Screen::GetDisplayNearestPoint( |
+ ash::Shell::GetRootNativeView(), last_mouse_location_in_screen); |
gfx::Rect work_area = |
ScreenAsh::ConvertRectFromScreen(window()->parent(), display.work_area()); |
if (details_.window_component == HTCAPTION) { |
@@ -544,7 +546,9 @@ void WorkspaceWindowResizer::UpdateDragPhantomWindow(const gfx::Rect& bounds, |
PhantomWindowController::STYLE_DRAGGING); |
// Always show the drag phantom on the |another_root| window. |
drag_phantom_window_controller_->SetDestinationDisplay( |
- gfx::Screen::GetDisplayMatching(another_root->GetBoundsInScreen())); |
+ gfx::Screen::GetDisplayMatching( |
+ ash::Shell::GetRootNativeView(), |
+ another_root->GetBoundsInScreen())); |
if (!layer_) |
RecreateWindowLayers(); |
drag_phantom_window_controller_->Show(bounds_in_screen, layer_); |