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

Unified Diff: athena/wm/window_manager_impl.cc

Issue 465803002: Make the minimized home card not overlap activities on Athena (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed sadrul@'s comments + rebased Created 6 years, 4 months 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 | « athena/wm/split_view_controller.cc ('k') | extensions/shell/browser/shell_desktop_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_manager_impl.cc
diff --git a/athena/wm/window_manager_impl.cc b/athena/wm/window_manager_impl.cc
index d66f2ed1714d75d7fca4f511d45078bbc8a9fd87..bbe629eeb629737e2b36326b51c94f857543c3d1 100644
--- a/athena/wm/window_manager_impl.cc
+++ b/athena/wm/window_manager_impl.cc
@@ -90,13 +90,14 @@ void AthenaContainerLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
aura::Window::Windows list = instance->window_list_provider_->GetWindowList();
if (std::find(list.begin(), list.end(), child) == list.end())
return;
- aura::Window* window = NULL;
- if (instance->split_view_controller_->IsSplitViewModeActive())
- window = instance->split_view_controller_->left_window();
- else
- window = instance->container_.get();
- CHECK(window);
- child->SetBounds(gfx::Rect(window->bounds().size()));
+ gfx::Size size;
+ if (instance->split_view_controller_->IsSplitViewModeActive()) {
+ size = instance->split_view_controller_->left_window()->bounds().size();
+ } else {
+ size =
+ gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area().size();
+ }
+ child->SetBounds(gfx::Rect(size));
}
void AthenaContainerLayoutManager::OnWillRemoveWindowFromLayout(
« no previous file with comments | « athena/wm/split_view_controller.cc ('k') | extensions/shell/browser/shell_desktop_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698