Chromium Code Reviews| Index: components/exo/shell_surface.cc |
| diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc |
| index 10efe727153569f65763e70a2f63d143f92155cd..7f40270bd02999295433bc1e904a81e6f2e611f2 100644 |
| --- a/components/exo/shell_surface.cc |
| +++ b/components/exo/shell_surface.cc |
| @@ -1241,9 +1241,28 @@ void ShellSurface::UpdateShadow() { |
| window->AddChild(shadow_underlay_); |
| window->StackChildAtBottom(shadow_underlay_); |
| } |
| - shadow_underlay_->layer()->SetOpacity( |
| - rectangular_shadow_background_opacity_); |
| - shadow_underlay_->SetBounds(shadow_bounds); |
| + |
| + ash::wm::WindowState* window_state = ash::wm::GetWindowState(window); |
|
reveman
2016/08/18 16:01:21
nit: no need for this temporary variable as window
oshima
2016/08/18 16:24:01
Done.
|
| + |
| + // Put the black background layer behind the window if |
| + // 1) the window is in immersive fullscreen. |
| + // 2) the window can control the bounds of the window in fullscreen ( |
| + // thus the background can be visible). |
| + // 3) the window has no transform (the transformed background may |
| + // not cover the entire background, e.g. overview mode). |
| + if (widget_->IsFullscreen() && |
| + window_state->allow_set_bounds_in_maximized() && |
| + window->layer()->transform().IsIdentity()) { |
| + gfx::Point origin; |
| + origin -= window->bounds().origin().OffsetFromOrigin(); |
| + gfx::Rect background_bounds(origin, window->parent()->bounds().size()); |
| + shadow_underlay_->SetBounds(background_bounds); |
| + shadow_underlay_->layer()->SetOpacity(1.f); |
| + } else { |
| + shadow_underlay_->SetBounds(shadow_bounds); |
| + shadow_underlay_->layer()->SetOpacity( |
| + rectangular_shadow_background_opacity_); |
| + } |
| shadow_underlay_->Show(); |
| wm::Shadow* shadow = wm::ShadowController::GetShadowForWindow(window); |