OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/window_resizer.h" | 5 #include "ash/wm/window_resizer.h" |
6 | 6 |
7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/property_util.h" | 9 #include "ash/wm/property_util.h" |
10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 if (new_bounds.bottom() > work_area.bottom()) | 204 if (new_bounds.bottom() > work_area.bottom()) |
205 new_bounds.Inset(0, 0, 0, | 205 new_bounds.Inset(0, 0, 0, |
206 new_bounds.bottom() - work_area.bottom()); | 206 new_bounds.bottom() - work_area.bottom()); |
207 } | 207 } |
208 if (details.bounds_change & kBoundsChange_Resizes && | 208 if (details.bounds_change & kBoundsChange_Resizes && |
209 details.bounds_change & kBoundsChange_Repositions && new_bounds.y() < 0) { | 209 details.bounds_change & kBoundsChange_Repositions && new_bounds.y() < 0) { |
210 int delta = new_bounds.y(); | 210 int delta = new_bounds.y(); |
211 new_bounds.set_y(0); | 211 new_bounds.set_y(0); |
212 new_bounds.set_height(new_bounds.height() + delta); | 212 new_bounds.set_height(new_bounds.height() + delta); |
213 } | 213 } |
214 // Mark as user changed. | |
215 wm::SetUserHasChangedWindowPositionOrSize(details.window, true); | |
sky
2012/10/16 17:25:34
Putting this here means if the user reverts the mo
Mr4D (OOO till 08-26)
2012/10/16 19:00:28
Done.
| |
214 return new_bounds; | 216 return new_bounds; |
215 } | 217 } |
216 | 218 |
217 // static | 219 // static |
218 bool WindowResizer::IsBottomEdge(int window_component) { | 220 bool WindowResizer::IsBottomEdge(int window_component) { |
219 return window_component == HTBOTTOMLEFT || | 221 return window_component == HTBOTTOMLEFT || |
220 window_component == HTBOTTOM || | 222 window_component == HTBOTTOM || |
221 window_component == HTBOTTOMRIGHT || | 223 window_component == HTBOTTOMRIGHT || |
222 window_component == HTGROWBOX; | 224 window_component == HTGROWBOX; |
223 } | 225 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 details.window).bounds().height(); | 305 details.window).bounds().height(); |
304 if (height > max_height) { | 306 if (height > max_height) { |
305 height = max_height; | 307 height = max_height; |
306 *delta_y = -y_multiplier * (details.initial_bounds.height() - max_height); | 308 *delta_y = -y_multiplier * (details.initial_bounds.height() - max_height); |
307 } | 309 } |
308 } | 310 } |
309 return height; | 311 return height; |
310 } | 312 } |
311 | 313 |
312 } // namespace aura | 314 } // namespace aura |
OLD | NEW |