Chromium Code Reviews| Index: ash/wm/default_state.cc |
| diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc |
| index 61a3dc6b09120e7fcb0529e2ee51659898c6b010..58e00b71ae81a337e703631c24be62e2d6dc4818 100644 |
| --- a/ash/wm/default_state.cc |
| +++ b/ash/wm/default_state.cc |
| @@ -31,6 +31,11 @@ namespace { |
| // must be visible when the window is added to the workspace. |
| const float kMinimumPercentOnScreenArea = 0.3f; |
| +// When a window that has restore bounds at least as large as a work area is |
| +// unmaximized, inset the bounds slightly so that they are not exactly the same. |
| +// This makes it easier to resize the window. |
| +const int kMaximizedWindowInset = 10; // Pixels. |
|
sky
2015/06/06 17:59:30
Is this really pixels?
varkha
2015/06/06 20:13:17
I thought so. Isn't that what window bounds are ex
sky
2015/06/07 00:05:20
It may depend upon the platform, but I have to loo
oshima
2015/06/07 01:19:02
This is DIP.
|
| + |
| bool IsMinimizedWindowState(const WindowStateType state_type) { |
| return state_type == WINDOW_STATE_TYPE_MINIMIZED || |
| state_type == WINDOW_STATE_TYPE_DOCKED_MINIMIZED; |
| @@ -643,10 +648,9 @@ void DefaultState::UpdateBoundsFromState(WindowState* window_state, |
| if (previous_state_type == WINDOW_STATE_TYPE_MAXIMIZED && |
| bounds_in_parent.width() >= work_area_in_parent.width() && |
| bounds_in_parent.height() >= work_area_in_parent.height()) { |
| - // Inset the bounds slightly so that they are not exactly same as |
| - // the work area bounds and it is easier to resize the window. |
| bounds_in_parent = work_area_in_parent; |
| - bounds_in_parent.Inset(10, 10, 10, 10); |
| + bounds_in_parent.Inset(kMaximizedWindowInset, kMaximizedWindowInset, |
| + kMaximizedWindowInset, kMaximizedWindowInset); |
| } |
| } else { |
| bounds_in_parent = window->bounds(); |