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

Unified Diff: ash/system/chromeos/power/tablet_power_button_controller.cc

Issue 2521103002: Ignore OnKeyEvent for VKEY_POWER because it is handled by PowerButtonEvent (Closed)
Patch Set: tests Created 4 years, 1 month 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 | « no previous file | ash/system/chromeos/power/tablet_power_button_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/power/tablet_power_button_controller.cc
diff --git a/ash/system/chromeos/power/tablet_power_button_controller.cc b/ash/system/chromeos/power/tablet_power_button_controller.cc
index 3ee60e7e51576b87a1fb64cdf5ffb82ca61dbc50..06d9efae2292990d999ea471bae6c94bf3424912 100644
--- a/ash/system/chromeos/power/tablet_power_button_controller.cc
+++ b/ash/system/chromeos/power/tablet_power_button_controller.cc
@@ -139,6 +139,11 @@ void TabletPowerButtonController::SuspendDone(
}
void TabletPowerButtonController::OnKeyEvent(ui::KeyEvent* event) {
+ // Ignore key events generated by the power button since power button activity
+ // is already handled by OnPowerButtonEvent().
+ if (event->key_code() == ui::VKEY_POWER)
+ return;
+
if (!IsTabletModeActive() && backlights_forced_off_)
SetBacklightsForcedOff(false);
}
« no previous file with comments | « no previous file | ash/system/chromeos/power/tablet_power_button_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698