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

Unified Diff: ash/wm/workspace/workspace_manager.cc

Issue 18637004: Sets the background color of shelf is opaque black when maximized (2nd) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove log Created 7 years, 5 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 | « ash/wm/workspace/workspace_manager.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_manager.cc
diff --git a/ash/wm/workspace/workspace_manager.cc b/ash/wm/workspace/workspace_manager.cc
index a060df2e78e40b5145b670da78d069fb3197010f..f2b5278e44c953cc136c1d12862eb8586755b4b8 100644
--- a/ash/wm/workspace/workspace_manager.cc
+++ b/ash/wm/workspace/workspace_manager.cc
@@ -225,6 +225,7 @@ void WorkspaceManager::SetActiveWorkspaceByWindow(Window* window) {
base::TimeDelta());
}
}
+
if (workspace->is_fullscreen() && wm::IsWindowFullscreen(window)) {
// Clicking on the fullscreen window in a fullscreen workspace. Force all
// other windows to drop to the desktop.
@@ -538,9 +539,6 @@ void WorkspaceManager::ShowOrHideDesktopBackground(
case SWITCH_WORKSPACE_CYCLER:
// The workspace cycler has already animated the desktop background's
// opacity. Do not do any further animation.
- case SWITCH_BACKGROUND_ONLY_WITHIN_DESKTOP:
- // The show/hide of background may happen within the desktop workspace
- // for maximized windows. In that case no animation is needed.
break;
case SWITCH_FULLSCREEN_FROM_FULLSCREEN_WORKSPACE:
case SWITCH_MAXIMIZED_OR_RESTORED:
@@ -681,20 +679,6 @@ void WorkspaceManager::OnWillRemoveWindowFromWorkspace(Workspace* workspace,
void WorkspaceManager::OnWindowRemovedFromWorkspace(Workspace* workspace,
Window* child) {
- // Reappear the background which was hidden when a window is maximized.
- if (wm::IsWindowMaximized(child) && workspace == active_workspace_ &&
- GetWindowState() != WORKSPACE_WINDOW_STATE_MAXIMIZED) {
- RootWindowController* root_controller = GetRootWindowController(
- workspace->window()->GetRootWindow());
- aura::Window* background = root_controller->GetContainer(
- kShellWindowId_DesktopBackgroundContainer);;
- ShowOrHideDesktopBackground(
- background,
- SWITCH_BACKGROUND_ONLY_WITHIN_DESKTOP,
- base::TimeDelta(),
- true);
- }
-
if (workspace->ShouldMoveToPending())
MoveWorkspaceToPendingOrDelete(workspace, NULL, SWITCH_WINDOW_REMOVED);
UpdateShelfVisibility();
@@ -732,31 +716,6 @@ void WorkspaceManager::OnWorkspaceWindowShowStateChanged(
// |child| better still be in |workspace| else things have gone wrong.
DCHECK_EQ(workspace, child->GetProperty(kWorkspaceKey));
- if (active_workspace_ == workspace) {
- // Show/hide state of the background has to be set here since maximized
- // window doesn't create its own workspace anymore.
- RootWindowController* root_controller = GetRootWindowController(
- contents_window_->GetRootWindow());
- aura::Window* background = root_controller->GetContainer(
- kShellWindowId_DesktopBackgroundContainer);
- if (wm::IsWindowMaximized(child)) {
- ShowOrHideDesktopBackground(
- background,
- last_show_state == ui::SHOW_STATE_MINIMIZED ?
- SWITCH_MAXIMIZED_OR_RESTORED :
- SWITCH_BACKGROUND_ONLY_WITHIN_DESKTOP,
- base::TimeDelta(),
- false);
- } else if (last_show_state == ui::SHOW_STATE_MAXIMIZED &&
- GetWindowState() != WORKSPACE_WINDOW_STATE_MAXIMIZED) {
- ShowOrHideDesktopBackground(
- background,
- SWITCH_BACKGROUND_ONLY_WITHIN_DESKTOP,
- base::TimeDelta(),
- true);
- }
- }
-
if (wm::IsWindowMinimized(child)) {
if (workspace->ShouldMoveToPending())
MoveWorkspaceToPendingOrDelete(workspace, NULL, SWITCH_MINIMIZED);
« no previous file with comments | « ash/wm/workspace/workspace_manager.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698