Skip to content

Commit

Permalink
Fix button-pressed handling in ImeDetailedView
Browse files Browse the repository at this point in the history
ImeDetailedView::HandleButtonPressed() now calls up to
its superclass ImeListView::HandleButtonPressed() in
order to handle clicks on the VK toggle button.

BUG=657146
TEST=ash_unittests

Review-Url: https://codereview.chromium.org/2513713002
Cr-Commit-Position: refs/heads/master@{#433076}
  • Loading branch information
tdanderson authored and Commit bot committed Nov 18, 2016
1 parent cfd33ce commit 6a7e15b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ash/common/system/chromeos/ime_menu/ime_list_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,10 @@ void ImeListView::HandleViewClicked(views::View* view) {

void ImeListView::HandleButtonPressed(views::Button* sender,
const ui::Event& event) {
DCHECK(material_keyboard_status_view_);
DCHECK_EQ(sender, material_keyboard_status_view_->toggle());
WmShell::Get()->ToggleIgnoreExternalKeyboard();
if (material_keyboard_status_view_ &&
sender == material_keyboard_status_view_->toggle()) {
WmShell::Get()->ToggleIgnoreExternalKeyboard();
}
}

} // namespace ash
1 change: 1 addition & 0 deletions ash/common/system/ime/tray_ime_chromeos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class IMEDetailedView : public ImeListView {

void HandleButtonPressed(views::Button* sender,
const ui::Event& event) override {
ImeListView::HandleButtonPressed(sender, event);
if (sender == settings_button_)
ShowSettings();
}
Expand Down

0 comments on commit 6a7e15b

Please sign in to comment.