Chromium Code Reviews| Index: ui/views/mus/desktop_window_tree_host_mus.cc |
| diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc |
| index 9731c9d9179ff015fb8372768ecfac04c951c7e4..99f19f8269f5484459372a4153e971f1cc802179 100644 |
| --- a/ui/views/mus/desktop_window_tree_host_mus.cc |
| +++ b/ui/views/mus/desktop_window_tree_host_mus.cc |
| @@ -122,12 +122,16 @@ void DesktopWindowTreeHostMus::ShowMaximizedWithBounds( |
| } |
| bool DesktopWindowTreeHostMus::IsVisible() const { |
| + if (parent_ && !parent_->native_widget_delegate_->AsWidget()->IsVisible()) |
|
msw
2016/11/09 23:57:55
Could we simply check !parent->IsVisible() instead
sky
2016/11/10 00:33:47
Added comment.
|
| + return false; |
| return window()->IsVisible(); |
| } |
| void DesktopWindowTreeHostMus::SetSize(const gfx::Size& size) { |
| + gfx::Rect screen_bounds = GetWindowBoundsInScreen(); |
|
msw
2016/11/09 23:57:55
Hmm, I don't really know why it makes sense to cal
sky
2016/11/10 00:33:47
This should be GetBounds(). Changed.
|
| + screen_bounds.set_size(size); |
| // TODO: handle device scale, http://crbug.com/663524. |
| - SetBounds(gfx::Rect(window()->bounds().origin(), size)); |
| + SetBounds(screen_bounds); |
| } |
| void DesktopWindowTreeHostMus::StackAbove(aura::Window* window) { |