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

Unified Diff: components/exo/shell_surface.cc

Issue 2255313005: Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: . Created 4 years, 4 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 | « no previous file | components/exo/shell_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index e5f435cce15ab67739e3ace2ebd6bdfb3f608983..c8af7501e18ac5c5804980bab95841ab0513c04f 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -1255,9 +1255,26 @@ void ShellSurface::UpdateShadow() {
window->AddChild(shadow_underlay_);
window->StackChildAtBottom(shadow_underlay_);
}
- shadow_underlay_->layer()->SetOpacity(
- rectangular_shadow_background_opacity_);
- shadow_underlay_->SetBounds(shadow_bounds);
+
+ // 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() &&
+ ash::wm::GetWindowState(window)->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);
« no previous file with comments | « no previous file | components/exo/shell_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698