| Index: components/exo/shell_surface.cc
|
| diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
|
| index 2857d2c7b618d299845f6d8679d87354044d4e0e..6fb1e63e25cfde7d102b672b2bff73b84112d983 100644
|
| --- a/components/exo/shell_surface.cc
|
| +++ b/components/exo/shell_surface.cc
|
| @@ -1464,15 +1464,7 @@ void ShellSurface::UpdateShadow() {
|
| if (!widget_ || !surface_)
|
| return;
|
| aura::Window* window = widget_->GetNativeWindow();
|
| -
|
| - bool underlay_capture_events =
|
| - WMHelper::GetInstance()->IsSpokenFeedbackEnabled() && widget_->IsActive();
|
| - bool black_background_enabled =
|
| - ((widget_->IsFullscreen() || widget_->IsMaximized()) ||
|
| - underlay_capture_events) &&
|
| - ash::wm::GetWindowState(window)->allow_set_bounds_direct() &&
|
| - window->layer()->GetTargetTransform().IsIdentity();
|
| - if (!shadow_enabled_ && !black_background_enabled) {
|
| + if (!shadow_enabled_) {
|
| wm::SetShadowElevation(window, wm::ShadowElevation::NONE);
|
| if (shadow_underlay_)
|
| shadow_underlay_->Hide();
|
| @@ -1540,6 +1532,10 @@ void ShellSurface::UpdateShadow() {
|
| }
|
| }
|
|
|
| + bool underlay_capture_events =
|
| + WMHelper::GetInstance()->IsSpokenFeedbackEnabled() &&
|
| + widget_->IsActive();
|
| +
|
| float shadow_underlay_opacity = shadow_background_opacity_;
|
|
|
| // Put the black background layer behind the window if
|
| @@ -1549,7 +1545,10 @@ void ShellSurface::UpdateShadow() {
|
| // 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 (black_background_enabled) {
|
| + if ((widget_->IsFullscreen() || widget_->IsMaximized() ||
|
| + underlay_capture_events) &&
|
| + ash::wm::GetWindowState(window)->allow_set_bounds_direct() &&
|
| + window->layer()->GetTargetTransform().IsIdentity()) {
|
| if (shadow_underlay_in_surface_) {
|
| shadow_underlay_bounds = gfx::Rect(surface_->window()->bounds().size());
|
| } else {
|
| @@ -1564,8 +1563,6 @@ void ShellSurface::UpdateShadow() {
|
| if (!shadow_underlay_in_surface_)
|
| shadow_underlay_bounds = shadow_bounds;
|
|
|
| - shadow_underlay_->SetBounds(shadow_underlay_bounds);
|
| -
|
| // Constrain the underlay bounds to the client area in case shell surface
|
| // frame is enabled.
|
| if (frame_enabled_) {
|
| @@ -1573,6 +1570,8 @@ void ShellSurface::UpdateShadow() {
|
| widget_->non_client_view()->frame_view()->GetBoundsForClientView());
|
| }
|
|
|
| + shadow_underlay_->SetBounds(shadow_underlay_bounds);
|
| +
|
| // TODO(oshima): Setting to the same value should be no-op.
|
| // crbug.com/642223.
|
| if (shadow_underlay_opacity !=
|
|
|