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

Unified Diff: ash/wm/window_util.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: Address varkha's comments in #7 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/window_util.cc
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index cd39d9c846664480a4e3cb605f7fb31fc2d51b15..0581a96a4b23f480207e1660c13552c031d1fdef 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -9,6 +9,7 @@
#include "ash/ash_constants.h"
#include "ash/screen_util.h"
#include "ash/shell.h"
+#include "ash/shell_window_ids.h"
#include "ash/snap_to_pixel_layout_manager.h"
#include "ash/wm/window_properties.h"
#include "ash/wm/window_state.h"
@@ -206,5 +207,14 @@ void InstallSnapLayoutManagerToContainers(aura::Window* parent) {
}
}
+void DockWindow(aura::Window* window) {
+ aura::Window* docked_container = Shell::GetContainer(
+ window->GetRootWindow(),
+ kShellWindowId_DockedContainer);
+ wm::ReparentChildWithTransientChildren(window,
+ window->parent(),
+ docked_container);
+}
+
} // namespace wm
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698