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

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

Issue 9969164: Ignoring alignment when it pushes a window out of the screen (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Not my code anymore Created 8 years, 8 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/workspace/workspace_manager.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('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 05ab750817c1ef223079375ff576e873419e40ae..e71013748789fb0ac020ca7a83df1b77aa713f2d 100644
--- a/ash/wm/workspace/workspace_manager.cc
+++ b/ash/wm/workspace/workspace_manager.cc
@@ -11,7 +11,6 @@
#include "ash/wm/property_util.h"
#include "ash/wm/shelf_layout_manager.h"
#include "ash/wm/window_animations.h"
-#include "ash/wm/window_resizer.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace/managed_workspace.h"
#include "ash/wm/workspace/maximized_workspace.h"
@@ -43,15 +42,6 @@ void BuildWindowList(const std::vector<aura::Window*>& windows,
}
}
-gfx::Rect AlignRectToGrid(const gfx::Rect& rect, int grid_size) {
- if (grid_size <= 1)
- return rect;
- return gfx::Rect(ash::WindowResizer::AlignToGrid(rect.x(), grid_size),
- ash::WindowResizer::AlignToGrid(rect.y(), grid_size),
- ash::WindowResizer::AlignToGrid(rect.width(), grid_size),
- ash::WindowResizer::AlignToGrid(rect.height(), grid_size));
-}
-
}
namespace ash {
@@ -105,9 +95,6 @@ void WorkspaceManager::AddWindow(aura::Window* window) {
return;
}
- if (wm::IsWindowNormal(window) && grid_size_ > 1)
- SetWindowBounds(window, AlignBoundsToGrid(window->GetTargetBounds()));
-
Workspace* workspace = NULL;
Workspace::Type type_for_window = Workspace::TypeForWindow(window);
switch (type_for_window) {
@@ -143,12 +130,6 @@ void WorkspaceManager::SetActiveWorkspaceByWindow(aura::Window* window) {
workspace->Activate();
}
-gfx::Rect WorkspaceManager::AlignBoundsToGrid(const gfx::Rect& bounds) {
- if (grid_size_ <= 1)
- return bounds;
- return AlignRectToGrid(bounds, grid_size_);
-}
-
void WorkspaceManager::UpdateShelfVisibility() {
shelf_->UpdateVisibilityState();
}
« no previous file with comments | « ash/wm/workspace/workspace_manager.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698