Commit 8982a33d authored by Thomas Tellier's avatar Thomas Tellier Committed by Commit Bot

Hide virtual keyboard on login/lock screen when shelf button gets focus

Bug: 1043903
Change-Id: Ie5cf4ce7f0465e538b077e25b472d545014eb9d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2403285Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Thomas Tellier <tellier@google.com>
Cr-Commit-Position: refs/heads/master@{#807017}
parent b24b256a
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <utility> #include <utility>
#include "ash/focus_cycler.h" #include "ash/focus_cycler.h"
#include "ash/keyboard/ui/keyboard_ui_controller.h"
#include "ash/lock_screen_action/lock_screen_action_background_state.h" #include "ash/lock_screen_action/lock_screen_action_background_state.h"
#include "ash/login/login_screen_controller.h" #include "ash/login/login_screen_controller.h"
#include "ash/login/ui/lock_screen.h" #include "ash/login/ui/lock_screen.h"
...@@ -248,6 +249,12 @@ class LoginShelfButton : public views::LabelButton { ...@@ -248,6 +249,12 @@ class LoginShelfButton : public views::LabelButton {
SchedulePaint(); SchedulePaint();
} }
void OnFocus() override {
auto* const keyboard_controller = keyboard::KeyboardUIController::Get();
keyboard_controller->set_keyboard_locked(false /*lock*/);
keyboard_controller->HideKeyboardImplicitlyByUser();
}
private: private:
const int text_resource_id_; const int text_resource_id_;
const gfx::VectorIcon& icon_; const gfx::VectorIcon& icon_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment