OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/lock_window_state.h" | 5 #include "ash/wm/lock_window_state.h" |
6 | 6 |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/lock_layout_manager.h" | 9 #include "ash/wm/lock_layout_manager.h" |
10 #include "ash/wm/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 void LockWindowState::UpdateBounds(wm::WindowState* window_state) { | 162 void LockWindowState::UpdateBounds(wm::WindowState* window_state) { |
163 if (!window_state->IsMaximized() && !window_state->IsFullscreen()) | 163 if (!window_state->IsMaximized() && !window_state->IsFullscreen()) |
164 return; | 164 return; |
165 | 165 |
166 keyboard::KeyboardController* keyboard_controller = | 166 keyboard::KeyboardController* keyboard_controller = |
167 keyboard::KeyboardController::GetInstance(); | 167 keyboard::KeyboardController::GetInstance(); |
168 gfx::Rect keyboard_bounds; | 168 gfx::Rect keyboard_bounds; |
169 | 169 |
170 if (keyboard_controller && !keyboard::IsKeyboardOverscrollEnabled()) | 170 if (keyboard_controller && |
| 171 !keyboard::IsKeyboardOverscrollEnabled() && |
| 172 keyboard_controller->keyboard_visible()) { |
171 keyboard_bounds = keyboard_controller->current_keyboard_bounds(); | 173 keyboard_bounds = keyboard_controller->current_keyboard_bounds(); |
| 174 } |
172 | 175 |
173 gfx::Rect bounds = | 176 gfx::Rect bounds = |
174 ScreenUtil::GetDisplayBoundsInParent(window_state->window()); | 177 ScreenUtil::GetDisplayBoundsInParent(window_state->window()); |
175 bounds.set_height(bounds.height() - keyboard_bounds.height()); | 178 bounds.set_height(bounds.height() - keyboard_bounds.height()); |
| 179 |
| 180 VLOG(1) << "Updating window bounds to: " << bounds.ToString(); |
176 window_state->SetBoundsDirect(bounds); | 181 window_state->SetBoundsDirect(bounds); |
177 } | 182 } |
178 | 183 |
179 } // namespace ash | 184 } // namespace ash |
OLD | NEW |