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

Unified Diff: ash/common/shelf/shelf_window_watcher.cc

Issue 2576023002: Fixes bug where shelf items could be added for children windows (Closed)
Patch Set: Created 4 years 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/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_window_watcher.cc
diff --git a/ash/common/shelf/shelf_window_watcher.cc b/ash/common/shelf/shelf_window_watcher.cc
index 92bfe9a1cfca22879a5b236302fc4d7625c4b445..b4087c29f599ce7722de355cdd2e80497d0e747b 100644
--- a/ash/common/shelf/shelf_window_watcher.cc
+++ b/ash/common/shelf/shelf_window_watcher.cc
@@ -100,6 +100,11 @@ void ShelfWindowWatcher::UserWindowObserver::OnWindowDestroying(
void ShelfWindowWatcher::UserWindowObserver::OnWindowVisibilityChanged(
WmWindow* window,
bool visible) {
+ // OnWindowVisibilityChanged() is called for descendants too. We only care
+ // about changes to the visibility of windows we know about.
+ if (!window_watcher_->observed_user_windows_.IsObserving(window))
+ return;
+
// The tooltip behavior for panel windows depends on the panel visibility.
window_watcher_->OnUserWindowPropertyChanged(window);
}
« no previous file with comments | « no previous file | ash/common/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698