diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-16 18:24:46 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-16 18:24:46 +0000 |
commit | b7d0812e4f6744e851cf874f2e6354cbfc05d921 (patch) | |
tree | 50ce96a2e4eed94181e035413185928fad04f022 /ash/wm/shelf_layout_manager.cc | |
parent | 2c60c8ac55953d49b59d7595a95a850ddc6ef2e1 (diff) | |
download | chromium_src-b7d0812e4f6744e851cf874f2e6354cbfc05d921.zip chromium_src-b7d0812e4f6744e851cf874f2e6354cbfc05d921.tar.gz chromium_src-b7d0812e4f6744e851cf874f2e6354cbfc05d921.tar.bz2 |
Dim shelf when maximized
BUG=146959
Test=Visual
Review URL: https://codereview.chromium.org/10916321
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/shelf_layout_manager.cc')
-rw-r--r-- | ash/wm/shelf_layout_manager.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc index c88d2f1..4c44ee8 100644 --- a/ash/wm/shelf_layout_manager.cc +++ b/ash/wm/shelf_layout_manager.cc @@ -253,7 +253,7 @@ void ShelfLayoutManager::LayoutShelf() { CalculateTargetBounds(state_, &target_bounds); if (launcher_widget()) { GetLayer(launcher_widget())->SetOpacity(target_bounds.opacity); - launcher_widget()->SetBounds( + launcher_->SetWidgetBounds( ScreenAsh::ConvertRectToScreen( launcher_widget()->GetNativeView()->parent(), target_bounds.launcher_bounds_in_root)); @@ -515,6 +515,15 @@ void ShelfLayoutManager::SetState(VisibilityState visibility_state) { state.auto_hide_state = CalculateAutoHideState(visibility_state); state.is_screen_locked = delegate && delegate->IsScreenLocked(); + // It's possible for SetState() when a window becomes maximized but the state + // won't have changed value. Do the dimming check before the early exit. + if (launcher_ && workspace_controller_) { + launcher_->SetDimsShelf( + (state.visibility_state == VISIBLE) && + workspace_controller_->GetWindowState() == + WORKSPACE_WINDOW_STATE_MAXIMIZED); + } + if (state_.Equals(state)) return; // Nothing changed. |