| Index: components/exo/shell_surface.cc
|
| diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
|
| index 4f9ebb4cc30bb7255be0ae8d3904db0aee9ec7d8..7a19f872860773b78757c243c42316db53ed5650 100644
|
| --- a/components/exo/shell_surface.cc
|
| +++ b/components/exo/shell_surface.cc
|
| @@ -379,22 +379,28 @@ void ShellSurface::OnSurfaceCommit() {
|
| UpdateWidgetBounds();
|
|
|
| gfx::Point surface_origin = GetSurfaceOrigin();
|
| - gfx::Rect hit_test_bounds =
|
| - surface_->GetHitTestBounds() + surface_origin.OffsetFromOrigin();
|
| -
|
| - // Only allow the shelf to recognize this window if the hit-test bounds
|
| - // contains the widget bounds. This prevents shaped windows that might
|
| - // only occupy a small area of the widget from dimming the shelf when
|
| - // maximized.
|
| - bool ignored_by_shelf = !hit_test_bounds.Contains(
|
| - gfx::Rect(widget_->GetNativeWindow()->bounds().size()));
|
| -
|
| - // Update state and shelf visibility if |ignored_by_shelf| changed.
|
| - ash::wm::WindowState* window_state =
|
| - ash::wm::GetWindowState(widget_->GetNativeWindow());
|
| - if (ignored_by_shelf != window_state->ignored_by_shelf()) {
|
| - window_state->set_ignored_by_shelf(ignored_by_shelf);
|
| - ash::Shell::GetInstance()->UpdateShelfVisibility();
|
| +
|
| + // Determine if window should be ignored by shelf if all configure requests
|
| + // have been acknowledged.
|
| + if (pending_configs_.empty()) {
|
| + gfx::Rect hit_test_bounds =
|
| + surface_->GetHitTestBounds() + surface_origin.OffsetFromOrigin();
|
| +
|
| + // When maximized, only allow the shelf to recognize this window if the
|
| + // hit-test bounds contains the widget bounds. This prevents shaped
|
| + // windows that might only occupy a small area of the widget from dimming
|
| + // the shelf when maximized.
|
| + bool ignored_by_shelf = widget_->IsMaximized() &&
|
| + !hit_test_bounds.Contains(gfx::Rect(
|
| + widget_->GetNativeWindow()->bounds().size()));
|
| +
|
| + // Update state and shelf visibility if |ignored_by_shelf| changed.
|
| + ash::wm::WindowState* window_state =
|
| + ash::wm::GetWindowState(widget_->GetNativeWindow());
|
| + if (ignored_by_shelf != window_state->ignored_by_shelf()) {
|
| + window_state->set_ignored_by_shelf(ignored_by_shelf);
|
| + ash::Shell::GetInstance()->UpdateShelfVisibility();
|
| + }
|
| }
|
|
|
| // Update surface bounds.
|
|
|