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

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

Issue 12441010: Attach panel while dragging to bring it in front of other panels. (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
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..2e6be05d8ea7be7be3ac53bdd2bf0f3f8c6246d5 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -238,7 +238,6 @@ void PanelLayoutManager::Shutdown() {
void PanelLayoutManager::StartDragging(aura::Window* panel) {
DCHECK(!dragged_panel_);
- DCHECK(panel->parent() == panel_container_);
dragged_panel_ = panel;
Relayout();
}
@@ -279,7 +278,8 @@ void PanelLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
panel_info.callout_widget = new PanelCalloutWidget(panel_container_);
panel_windows_.push_back(panel_info);
child->AddObserver(this);
- Relayout();
+ if (child != dragged_panel_)
+ Relayout();
}
void PanelLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {

Powered by Google App Engine
This is Rietveld 408576698