Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index 83b04067986b3dd9ba84124d50132d1ecef4a1d5..8ea3a134ca6fa7e1bc3bf1e995cd29265b3d743c 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -887,7 +887,6 @@ void Shell::Init(const ShellInitParams& init_params) { |
display_controller_->Start(); |
display_controller_->CreatePrimaryHost( |
ShellInitParamsToAshWindowTreeHostInitParams(init_params)); |
- virtual_keyboard_controller_.reset(new VirtualKeyboardController); |
aura::Window* root_window = display_controller_->GetPrimaryRootWindow(); |
target_root_window_ = root_window; |
@@ -1032,6 +1031,10 @@ void Shell::Init(const ShellInitParams& init_params) { |
display_controller_->InitDisplays(); |
+ // Needs to be created after InitDisplays() since it may cause the virtual |
+ // keyboard to be deployed. |
+ virtual_keyboard_controller_.reset(new VirtualKeyboardController); |
+ |
// It needs to be created after RootWindowController has been created |
// (which calls OnWindowResized has been called, otherwise the |
// widget will not paint when restoring after a browser crash. Also it needs |