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

Unified Diff: ash/wm/window_state.cc

Issue 262593003: Revert of 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: 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/window_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state.cc
diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc
index 7c5c1674f14b050f4593608c1fa278d72e571221..f0bed4ba0f38d31bdabbde0bf9f6c6b1b9f646b0 100644
--- a/ash/wm/window_state.cc
+++ b/ash/wm/window_state.cc
@@ -24,7 +24,6 @@
#include "ui/compositor/layer_tree_owner.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
#include "ui/wm/core/window_util.h"
namespace ash {
@@ -358,21 +357,7 @@
}
void WindowState::SetBoundsDirect(const gfx::Rect& bounds) {
- gfx::Rect actual_new_bounds(bounds);
- // Ensure we don't go smaller than our minimum bounds in "normal" window
- // modes
- if (window_->delegate() && !IsMaximized() && !IsFullscreen()) {
- // Get the minimum usable size of the minimum size and the screen size.
- gfx::Size min_size = window_->delegate()->GetMinimumSize();
- min_size.SetToMin(gfx::Screen::GetScreenFor(
- window_)->GetDisplayNearestWindow(window_).work_area().size());
-
- 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()));
- }
- BoundsSetter().SetBounds(window_, actual_new_bounds);
+ BoundsSetter().SetBounds(window_, bounds);
}
void WindowState::SetBoundsConstrained(const gfx::Rect& bounds) {
« no previous file with comments | « no previous file | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698