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

Unified Diff: ash/wm/workspace/workspace_manager.cc

Issue 10388036: Adds the option of aligning the launcher to the left or right. There (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 8 years, 7 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 | « ash/wm/shelf_layout_manager_unittest.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_manager.cc
diff --git a/ash/wm/workspace/workspace_manager.cc b/ash/wm/workspace/workspace_manager.cc
index 6a61b92a7b059969c09a64ae4535897fb085b53f..d4eda81dc4a669c9e6d2d4d708c931527a13ad55 100644
--- a/ash/wm/workspace/workspace_manager.cc
+++ b/ash/wm/workspace/workspace_manager.cc
@@ -137,9 +137,7 @@ WorkspaceManager::WindowState WorkspaceManager::GetWindowState() {
return WINDOW_STATE_DEFAULT;
// TODO: this code needs to be made multi-monitor aware.
- gfx::Rect bounds(
- gfx::Screen::GetMonitorNearestWindow(contents_view_).bounds());
- bounds.set_height(bounds.height() - shelf_->shelf_height());
+ gfx::Rect shelf_bounds(shelf_->GetIdealBounds());
const aura::Window::Windows& windows(contents_view_->children());
bool window_overlaps_launcher = false;
bool has_maximized_window = false;
@@ -155,7 +153,7 @@ WorkspaceManager::WindowState WorkspaceManager::GetWindowState() {
} else if (wm::IsWindowFullscreen(*i)) {
return WINDOW_STATE_FULL_SCREEN;
}
- if (!window_overlaps_launcher && (*i)->bounds().bottom() > bounds.bottom())
+ if (!window_overlaps_launcher && (*i)->bounds().Intersects(shelf_bounds))
window_overlaps_launcher = true;
}
if (has_maximized_window)
« no previous file with comments | « ash/wm/shelf_layout_manager_unittest.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698