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

Unified Diff: ash/wm/lock_window_state.cc

Issue 528043002: Fix stale keyboard bounds on login screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 3 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 | « ash/wm/lock_layout_manager_unittest.cc ('k') | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/lock_window_state.cc
diff --git a/ash/wm/lock_window_state.cc b/ash/wm/lock_window_state.cc
index 5d38b59e8e51be375c01259aad205a6c6862c997..fa1684fda80da50a3bb62cd5f6a207ad98cb0b65 100644
--- a/ash/wm/lock_window_state.cc
+++ b/ash/wm/lock_window_state.cc
@@ -167,12 +167,17 @@ void LockWindowState::UpdateBounds(wm::WindowState* window_state) {
keyboard::KeyboardController::GetInstance();
gfx::Rect keyboard_bounds;
- if (keyboard_controller && !keyboard::IsKeyboardOverscrollEnabled())
+ if (keyboard_controller &&
+ !keyboard::IsKeyboardOverscrollEnabled() &&
+ keyboard_controller->keyboard_visible()) {
keyboard_bounds = keyboard_controller->current_keyboard_bounds();
+ }
gfx::Rect bounds =
ScreenUtil::GetDisplayBoundsInParent(window_state->window());
bounds.set_height(bounds.height() - keyboard_bounds.height());
+
+ VLOG(1) << "Updating window bounds to: " << bounds.ToString();
window_state->SetBoundsDirect(bounds);
}
« no previous file with comments | « ash/wm/lock_layout_manager_unittest.cc ('k') | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698