| Index: ui/views/widget/native_widget_aura.cc
|
| diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
|
| index 202caa8ac1914ad8683cc722cd1be5f75923ac3d..0b10f0abdb3df0cf62884cd446e9cd3150f9f285 100644
|
| --- a/ui/views/widget/native_widget_aura.cc
|
| +++ b/ui/views/widget/native_widget_aura.cc
|
| @@ -349,7 +349,7 @@ InputMethod* NativeWidgetAura::CreateInputMethod() {
|
| }
|
|
|
| void NativeWidgetAura::CenterWindow(const gfx::Size& size) {
|
| - gfx::Rect parent_bounds(window_->parent()->GetScreenBounds());
|
| + gfx::Rect parent_bounds(window_->parent()->GetBoundsInRootWindow());
|
| // When centering window, we take the intersection of the host and
|
| // the parent. We assume the root window represents the visible
|
| // rect of a single screen.
|
| @@ -360,7 +360,7 @@ void NativeWidgetAura::CenterWindow(const gfx::Size& size) {
|
| // center it with respect to the transient parent.
|
| if (window_->transient_parent()) {
|
| gfx::Rect transient_parent_rect = window_->transient_parent()->
|
| - GetScreenBounds().Intersect(work_area);
|
| + GetBoundsInRootWindow().Intersect(work_area);
|
| if (transient_parent_rect.height() >= size.height() &&
|
| transient_parent_rect.width() >= size.width())
|
| parent_bounds = transient_parent_rect;
|
| @@ -420,9 +420,12 @@ void NativeWidgetAura::InitModalType(ui::ModalType modal_type) {
|
|
|
| gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const {
|
| #if defined(ENABLE_DIP)
|
| - return ConvertRectFromMonitor(window_->GetScreenBounds());
|
| + return ConvertRectFromMonitor(window_->GetBoundsInRootWindow());
|
| #else
|
| - return window_->GetScreenBounds();
|
| + gfx::Rect bounds = window_->GetBoundsInRootWindow();
|
| + if (desktop_helper_.get())
|
| + bounds = desktop_helper_->ChangeRootWindowBoundsToScreenBounds(bounds);
|
| + return bounds;
|
| #endif
|
| }
|
|
|
| @@ -430,9 +433,12 @@ gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const {
|
| // View-to-screen coordinate system transformations depend on this returning
|
| // the full window bounds, for example View::ConvertPointToScreen().
|
| #if defined(ENABLE_DIP)
|
| - return ConvertRectFromMonitor(window_->GetScreenBounds());
|
| + return ConvertRectFromMonitor(window_->GetBoundsInRootWindow());
|
| #else
|
| - return window_->GetScreenBounds();
|
| + gfx::Rect bounds = window_->GetBoundsInRootWindow();
|
| + if (desktop_helper_.get())
|
| + bounds = desktop_helper_->ChangeRootWindowBoundsToScreenBounds(bounds);
|
| + return bounds;
|
| #endif
|
| }
|
|
|
|
|