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

Unified Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2764703002: cros: Force disable stylus features on pyro (Closed)
Patch Set: Initial upload Created 3 years, 9 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 | « no previous file | ash/common/system/chromeos/palette/palette_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/palette/palette_tray.cc
diff --git a/ash/common/system/chromeos/palette/palette_tray.cc b/ash/common/system/chromeos/palette/palette_tray.cc
index 7f66235cfc8801c8bea789b9af2270ebd4228c06..1fdb996b02ee4a7e3666755872ecf04f06e5d895 100644
--- a/ash/common/system/chromeos/palette/palette_tray.cc
+++ b/ash/common/system/chromeos/palette/palette_tray.cc
@@ -283,6 +283,10 @@ void PaletteTray::OnTouchscreenDeviceConfigurationChanged() {
}
void PaletteTray::OnStylusStateChanged(ui::StylusState stylus_state) {
+ // Device may have a stylus but it has been forcibly disabled.
+ if (!palette_utils::HasStylusInput())
+ return;
+
PaletteDelegate* palette_delegate = Shell::GetInstance()->palette_delegate();
// Don't do anything if the palette should not be shown or if the user has
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698