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

Unified Diff: ash/wm/workspace/workspace_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/workspace/workspace_layout_manager.cc
diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc
index 63c4aed0e71112d817c63f2d2bd71d113efe85f6..a6fde9c6d5693b9f96c9378ac6bd07ff5bd24cd3 100644
--- a/ash/wm/workspace/workspace_layout_manager.cc
+++ b/ash/wm/workspace/workspace_layout_manager.cc
@@ -12,6 +12,7 @@
#include "ash/session/session_state_delegate.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shell.h"
+#include "ash/shell_window_ids.h"
#include "ash/wm/always_on_top_controller.h"
#include "ash/wm/window_animations.h"
#include "ash/wm/window_positioner.h"
@@ -260,6 +261,22 @@ void WorkspaceLayoutManager::OnWindowActivated(aura::Window* gained_active,
//////////////////////////////////////////////////////////////////////////////
// WorkspaceLayoutManager, wm::WindowStateObserver implementation:
+void WorkspaceLayoutManager::OnPreWindowStateTypeChange(
varkha 2014/09/24 03:16:23 Can this code be placed in some place that is dock
dtapuska 2014/09/25 23:27:09 see comment in panel_layout_manager.cc
+ 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 WorkspaceLayoutManager::OnPostWindowStateTypeChange(
wm::WindowState* window_state,
wm::WindowStateType old_type) {
« ash/wm/panels/panel_layout_manager.cc ('K') | « ash/wm/workspace/workspace_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698