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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 280383009: Fixing invalid window opacity/visibility combination with the shelf (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 6 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/root_window_controller_unittest.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_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 9df4bdc791d25f11f9376ac5e6bf0b96c04ba687..db8c6ea11303ebeffc6c0dd4dd5743880dccace3 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -723,6 +723,14 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity(
GetLayer(shelf_->status_area_widget())->SetOpacity(
target_bounds.status_opacity);
+
+ // Having a window which is visible but does not have an opacity is an illegal
+ // state. We therefore show / hide the shelf here if required.
+ if (!target_bounds.status_opacity)
+ shelf_->status_area_widget()->Hide();
+ else if (target_bounds.status_opacity)
+ shelf_->status_area_widget()->Show();
+
// TODO(harrym): Once status area widget is a child view of shelf
// this can be simplified.
gfx::Rect status_bounds = target_bounds.status_bounds_in_shelf;
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698