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

Unified Diff: ash/shelf/shelf_locking_manager.cc

Issue 2013933002: Fix shelf alignment locking for power button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove compositor DCHECK workaround. Created 4 years, 7 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 | « ash/accelerators/accelerator_table.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_locking_manager.cc
diff --git a/ash/shelf/shelf_locking_manager.cc b/ash/shelf/shelf_locking_manager.cc
index 93c8832b9e09b75b5a7f16d16a8fd5940e8b70f6..d82177ec89e116a552e989e06cd1ac040d97ff03 100644
--- a/ash/shelf/shelf_locking_manager.cc
+++ b/ash/shelf/shelf_locking_manager.cc
@@ -41,10 +41,8 @@ void ShelfLockingManager::SessionStateChanged(
}
void ShelfLockingManager::OnLockStateEvent(EventType event) {
- // This is only called when locking the screen; there is no unlock event here.
- // It's also called when the screen lock animation begins and should help the
- // shelf appear locked much earlier than ShellObserver::OnLockStateChanged.
- screen_locked_ = true;
+ // Lock when the animation starts, ignoring pre-lock. There's no unlock event.
+ screen_locked_ |= event == EVENT_LOCK_ANIMATION_STARTED;
UpdateLockedState();
}
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698