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

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

Issue 9566014: Attempt 2: Allows tab dragging when maximized on aura. To fix it I made it so (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 8 years, 10 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_window_resizer.h ('k') | ash/wm/workspace_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_window_resizer.cc
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index fe843a132418f8118a9e0318743449ebc9121d23..b881b792cb37316cd8ebf4b4ba3bbe266605262a 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -4,6 +4,7 @@
#include "ash/wm/workspace/workspace_window_resizer.h"
+#include "ash/wm/window_util.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
#include "ui/aura/window_property.h"
@@ -30,8 +31,10 @@ WorkspaceWindowResizer::WorkspaceWindowResizer(aura::Window* window,
const gfx::Point& location,
int window_component,
int grid_size)
- : WindowResizer(window, location, window_component, grid_size) {
+ : WindowResizer(window, location, window_component, grid_size),
+ constrain_size_(wm::IsWindowNormal(window)) {
if (is_resizable() && GetHeightBeforeObscured(window) &&
+ constrain_size_ &&
(!WindowTouchesBottomOfScreen() ||
bounds_change() != kBoundsChange_Repositions)) {
ClearHeightBeforeObscured(window);
@@ -84,6 +87,9 @@ int WorkspaceWindowResizer::GetHeightBeforeObscured(aura::Window* window) {
}
void WorkspaceWindowResizer::AdjustBounds(gfx::Rect* bounds) const {
+ if (!constrain_size_)
+ return;
+
gfx::Rect work_area(gfx::Screen::GetMonitorWorkAreaNearestWindow(window()));
if (bounds->bottom() < work_area.bottom()) {
int height = GetHeightBeforeObscured(window());
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.h ('k') | ash/wm/workspace_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698