Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1434)

Unified Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2493653002: Fixes DesktopWindowTreeHostMus::SetSize and IsVisible (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698