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

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: Check that dragged panel is in panel container before stacking at top. 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 | « no previous file | ash/wm/panels/panel_window_resizer.cc » ('j') | ash/wm/toplevel_window_event_handler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..11f443bce2097009241a7dd5790013da1f0be7a2 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();
}
@@ -568,6 +565,8 @@ void PanelLayoutManager::UpdateStacking(aura::Window* active_panel) {
}
panel_container_->StackChildAtTop(active_panel);
+ if (dragged_panel_ && dragged_panel_->parent() == panel_container_)
+ panel_container_->StackChildAtTop(dragged_panel_);
last_active_panel_ = active_panel;
}
« no previous file with comments | « no previous file | ash/wm/panels/panel_window_resizer.cc » ('j') | ash/wm/toplevel_window_event_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698