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

Unified Diff: ash/wm/dock/docked_window_layout_manager.cc

Issue 255063004: Ignoring minimum size requirements for maximized windows, full screen windows and too small screens (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The panel layout manager was also required Created 6 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 | « no previous file | ash/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_layout_manager.cc
diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc
index 063c467c9cb70c08fda104e119c7cd8a4dbb05a8..daddd1f419c8c261868cf28cd99c71f666460990 100644
--- a/ash/wm/dock/docked_window_layout_manager.cc
+++ b/ash/wm/dock/docked_window_layout_manager.cc
@@ -707,8 +707,17 @@ void DockedWindowLayoutManager::OnChildWindowVisibilityChanged(
void DockedWindowLayoutManager::SetChildBounds(
aura::Window* child,
const gfx::Rect& requested_bounds) {
+ // The minimum constraints have to be applied first by the layout manager.
+ gfx::Rect actual_new_bounds(requested_bounds);
+ if (child->delegate()) {
+ const gfx::Size& min_size = child->delegate()->GetMinimumSize();
+ actual_new_bounds.set_width(
+ std::max(min_size.width(), actual_new_bounds.width()));
+ actual_new_bounds.set_height(
+ std::max(min_size.height(), actual_new_bounds.height()));
+ }
// Whenever one of our windows is moved or resized enforce layout.
- SetChildBoundsDirect(child, requested_bounds);
+ SetChildBoundsDirect(child, actual_new_bounds);
if (IsPopupOrTransient(child))
return;
ShelfLayoutManager* shelf_layout =
« no previous file with comments | « no previous file | ash/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698