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

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

Issue 594383002: Change behaviour of the Alt-] and Alt-[ keys so that it cycles through SnapLeft/SnapRight to DockLe… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@event
Patch Set: Created 6 years, 3 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 a19c24568ab7383d1f2629a73e998014ec12810a..052b294fab4cb4ea176258c8368e08b7c524226d 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -484,6 +484,22 @@ void PanelLayoutManager::OnWindowPropertyChanged(aura::Window* window,
/////////////////////////////////////////////////////////////////////////////
// PanelLayoutManager, WindowStateObserver implementation:
+void PanelLayoutManager::OnPreWindowStateTypeChange(
varkha 2014/09/24 03:16:23 Would be nice to move this into some place that is
dtapuska 2014/09/25 23:27:09 I collapsed the moving code; but the state managem
+ wm::WindowState* window_state,
+ wm::WindowStateType old_type) {
+ aura::Window* window = window_state->window();
+ if (window_state->IsDocked()) {
+ // Reparent the window into the docked windows container in order to get it
+ // on top of other docked windows.
+ aura::Window* docked_container = Shell::GetContainer(
+ window->GetRootWindow(),
+ kShellWindowId_DockedContainer);
+ wm::ReparentChildWithTransientChildren(window,
+ window->parent(),
+ docked_container);
+ }
+}
+
void PanelLayoutManager::OnPostWindowStateTypeChange(
wm::WindowState* window_state,
wm::WindowStateType old_type) {

Powered by Google App Engine
This is Rietveld 408576698