| 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 3bd70369c6c621d34451a5dc70f64c8801bc11dd..3d7eee43b0d3c0eddd09eb18afc72622e9ded175 100644
|
| --- a/ash/wm/panels/panel_layout_manager.cc
|
| +++ b/ash/wm/panels/panel_layout_manager.cc
|
| @@ -238,14 +238,11 @@ void PanelLayoutManager::Shutdown() {
|
|
|
| void PanelLayoutManager::StartDragging(aura::Window* panel) {
|
| DCHECK(!dragged_panel_);
|
| - DCHECK(panel->parent() == panel_container_);
|
| dragged_panel_ = panel;
|
| Relayout();
|
| }
|
|
|
| void PanelLayoutManager::FinishDragging() {
|
| - // Note, dragged panel may be null if the panel was just attached to the
|
| - // panel layout.
|
| dragged_panel_ = NULL;
|
| Relayout();
|
| }
|
| @@ -279,7 +276,10 @@ void PanelLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
|
| panel_info.callout_widget = new PanelCalloutWidget(panel_container_);
|
| panel_windows_.push_back(panel_info);
|
| child->AddObserver(this);
|
| - Relayout();
|
| + // When dragging a panel on the default container it is temporarily added to
|
| + // the panel container and doesn't require a relayout.
|
| + if (child != dragged_panel_)
|
| + Relayout();
|
| }
|
|
|
| void PanelLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
|
|
|