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

Unified Diff: ash/wm/panels/panel_layout_manager.cc

Issue 844763006: Change overview mode to so that docked panel windows are not grouped together. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved restore window animation out of the ScopedTransformOverviewWindow destructor. Created 5 years, 11 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
Index: ash/wm/panels/panel_layout_manager.cc
diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc
index ccbf450f0c3d361c8c37461006e60a15a4099478..b9ee368bad6aa27445bb37c88d877840f54ca44a 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -15,6 +15,7 @@
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
+#include "ash/wm/overview/window_selector_controller.h"
#include "ash/wm/window_animations.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
@@ -263,7 +264,8 @@ PanelLayoutManager::PanelLayoutManager(aura::Window* panel_container)
shelf_(NULL),
shelf_layout_manager_(NULL),
last_active_panel_(NULL),
- weak_factory_(this) {
+ weak_factory_(this),
+ overview_mode_active_(false) {
DCHECK(panel_container);
aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
AddObserver(this);
@@ -464,6 +466,15 @@ void PanelLayoutManager::OnShelfIconPositionsChanged() {
////////////////////////////////////////////////////////////////////////////////
// PanelLayoutManager, ash::ShellObserver implementation:
+void PanelLayoutManager::OnOverviewModeStarting() {
+ overview_mode_active_ = true;
+}
+
+void PanelLayoutManager::OnOverviewModeEnding() {
+ overview_mode_active_ = false;
+ Relayout();
+}
+
void PanelLayoutManager::OnShelfAlignmentChanged(aura::Window* root_window) {
if (panel_container_->GetRootWindow() == root_window)
Relayout();
@@ -599,7 +610,12 @@ void PanelLayoutManager::Relayout() {
if (!shelf_ || !shelf_->shelf_widget())
return;
- if (in_layout_)
+ // Suppress layouts during overview mode because changing window bounds
+ // interfered with overview mode animations. However, layouts need to be done
+ // when the WindowSelectorController is restoring minimized windows so that
+ // they actually become visible.
+ if (in_layout_ || (overview_mode_active_ && !Shell::GetInstance()->
jonross 2015/01/15 19:39:42 Instead of tracking this, can we poll IsSelecting(
bruthig 2015/01/16 19:54:43 Done.
+ window_selector_controller()->IsRestoringMinimizedWindows()))
return;
base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
« ash/wm/overview/window_selector_item.cc ('K') | « ash/wm/panels/panel_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698