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

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

Issue 2786433002: cros: Force disable stylus features on pyro. (Closed)
Patch Set: 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 274ec6698a9eab84726dce0ee5bf6b90e3c7ff58..78146b08305b9128b7de261e64e48347d936f234 100644
--- a/ash/common/system/chromeos/palette/palette_tray.cc
+++ b/ash/common/system/chromeos/palette/palette_tray.cc
@@ -301,6 +301,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 = WmShell::Get()->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