Chromium Code Reviews| 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..dcb1b9ae6e3acc81e99da53fde3f2a02e2eebf04 100644 |
| --- a/ash/shelf/shelf_layout_manager.cc |
| +++ b/ash/shelf/shelf_layout_manager.cc |
| @@ -723,6 +723,15 @@ 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. |
| + bool visible = shelf_->status_area_widget()->IsVisible(); |
| + if (visible && !target_bounds.status_opacity) |
|
sky
2014/05/13 21:43:07
Do you really care about the current visibility?
Mr4D (OOO till 08-26)
2014/05/13 22:08:17
Was only trying to avoid duplicate calls. But sinc
|
| + shelf_->status_area_widget()->Hide(); |
| + else if (!visible && 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; |