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

Side by Side Diff: ash/wm/overview/scoped_transform_overview_window.cc

Issue 25551002: Fix visibility of minimized panels when restoring from overview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Alternate workaround. Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/overview/scoped_transform_overview_window.h" 5 #include "ash/wm/overview/scoped_transform_overview_window.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_state.h" 8 #include "ash/wm/window_state.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 if (window_copy_) 177 if (window_copy_)
178 new CleanupWidgetAfterAnimationObserver(window_copy_, layer_); 178 new CleanupWidgetAfterAnimationObserver(window_copy_, layer_);
179 AnimateTransformOnWindowAndTransientChildren(original_transform_); 179 AnimateTransformOnWindowAndTransientChildren(original_transform_);
180 window_copy_ = NULL; 180 window_copy_ = NULL;
181 layer_ = NULL; 181 layer_ = NULL;
182 if (minimized_ && window_->GetProperty(aura::client::kShowStateKey) != 182 if (minimized_ && window_->GetProperty(aura::client::kShowStateKey) !=
183 ui::SHOW_STATE_MINIMIZED) { 183 ui::SHOW_STATE_MINIMIZED) {
184 // Setting opacity 0 and visible false ensures that the property change 184 // Setting opacity 0 and visible false ensures that the property change
185 // to SHOW_STATE_MINIMIZED will not animate the window from its original 185 // to SHOW_STATE_MINIMIZED will not animate the window from its original
186 // bounds to the minimized position. 186 // bounds to the minimized position.
187 // Hiding the window needs to be done before the target opacity is 0,
188 // otherwise the layer's visibility will not be updated
189 // (See VisibilityController::UpdateLayerVisibility).
190 window_->Hide();
187 window_->layer()->SetOpacity(0); 191 window_->layer()->SetOpacity(0);
188 window_->Hide();
189 window_->SetProperty(aura::client::kShowStateKey, 192 window_->SetProperty(aura::client::kShowStateKey,
190 ui::SHOW_STATE_MINIMIZED); 193 ui::SHOW_STATE_MINIMIZED);
191 } 194 }
192 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(ignored_by_shelf_); 195 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(ignored_by_shelf_);
193 } else if (window_copy_) { 196 } else if (window_copy_) {
194 // If this class still owns a copy of the window, clean up the copy. This 197 // If this class still owns a copy of the window, clean up the copy. This
195 // will be the case if the window was destroyed. 198 // will be the case if the window was destroyed.
196 window_copy_->Close(); 199 window_copy_->Close();
197 if (layer_) 200 if (layer_)
198 views::corewm::DeepDeleteLayers(layer_); 201 views::corewm::DeepDeleteLayers(layer_);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 transient_child->SetTransform(transient_window_transform); 292 transient_child->SetTransform(transient_window_transform);
290 } 293 }
291 } 294 }
292 295
293 void ScopedTransformOverviewWindow::OnOverviewStarted() { 296 void ScopedTransformOverviewWindow::OnOverviewStarted() {
294 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true); 297 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true);
295 RestoreWindow(); 298 RestoreWindow();
296 } 299 }
297 300
298 } // namespace ash 301 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698