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

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

Issue 12319039: Set the window frames to be non transparent while the user is cycling through workspaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/window_properties.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_cycler_animator.cc
diff --git a/ash/wm/workspace/workspace_cycler_animator.cc b/ash/wm/workspace/workspace_cycler_animator.cc
index a22375c4e84c3d6fae22c83b3c8256085dc44ad9..0575c026771be89595422073bc00cb8f406f027c 100644
--- a/ash/wm/workspace/workspace_cycler_animator.cc
+++ b/ash/wm/workspace/workspace_cycler_animator.cc
@@ -13,10 +13,12 @@
#include "ash/shell_window_ids.h"
#include "ash/wm/property_util.h"
#include "ash/wm/shelf_layout_manager.h"
+#include "ash/wm/window_properties.h"
#include "ash/wm/workspace/colored_window_controller.h"
#include "ash/wm/workspace/workspace.h"
#include "ash/wm/workspace/workspace_cycler_configuration.h"
#include "base/values.h"
+#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/base/events/event_utils.h"
#include "ui/compositor/layer_animator.h"
@@ -388,6 +390,11 @@ void WorkspaceCyclerAnimator::Init(const std::vector<Workspace*>& workspaces,
}
void WorkspaceCyclerAnimator::AnimateStartingCycler() {
+ // Set kCyclingThroughWorkspaces so that the window frame is painted with the
+ // correct style.
+ workspaces_[0]->window()->GetRootWindow()->SetProperty(
+ ash::internal::kCyclingThroughWorkspacesKey, true);
+
// Ensure that the workspaces are stacked with respect to their order
// in |workspaces_|.
aura::Window* parent = workspaces_[0]->window()->parent();
@@ -592,6 +599,10 @@ void WorkspaceCyclerAnimator::AnimateToUpdatedState(int animation_duration) {
}
void WorkspaceCyclerAnimator::CyclerStopped(size_t visible_workspace_index) {
+ aura::Window* root_window = workspaces_[0]->window()->GetRootWindow();
+ root_window->SetProperty(ash::internal::kCyclingThroughWorkspacesKey,
+ false);
+
for(size_t i = 0; i < workspaces_.size(); ++i) {
aura::Window* window = workspaces_[i]->window();
ui::Layer* layer = window->layer();
« no previous file with comments | « ash/wm/window_properties.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698