Chromium Code Reviews| Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
| diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
| index 88c60906b7268d02bffd85fdb683ef05c9bca77a..c8a59ba57b463d6411ceec1c43d95c87d4b799b1 100644 |
| --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
| +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
| @@ -145,8 +145,11 @@ class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver { |
| void OnWindowBoundsChanged(aura::Window* window, |
| const gfx::Rect& old_bounds, |
| const gfx::Rect& new_bounds) override { |
| + // The position of the window may have changed. Hence we use SetBounds in |
|
sky
2015/01/23 17:14:57
I'm confused. Isn't child_window_ (or window here)
|
| + // place of SetSize. We need to pass the bounds in screen coordinates to |
| + // the Widget::SetBounds function. |
| if (top_level_widget_ && window == child_window_) |
| - top_level_widget_->SetSize(new_bounds.size()); |
| + top_level_widget_->SetBounds(window->GetBoundsInScreen()); |
| } |
| private: |