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

Unified Diff: ash/wm/stacking_controller.cc

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dock with zero width (no logs) Created 7 years, 6 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/stacking_controller.cc
diff --git a/ash/wm/stacking_controller.cc b/ash/wm/stacking_controller.cc
index 7b3337ff780f00c010a57752733168b60e9e760e..406b313471acfef2d376dda459e9882ed86a4d8d 100644
--- a/ash/wm/stacking_controller.cc
+++ b/ash/wm/stacking_controller.cc
@@ -10,6 +10,7 @@
#include "ash/shell_window_ids.h"
#include "ash/wm/always_on_top_controller.h"
#include "ash/wm/coordinate_conversion.h"
+#include "ash/wm/property_util.h"
#include "ash/wm/window_properties.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
@@ -85,6 +86,9 @@ aura::Window* StackingController::GetDefaultParent(aura::Window* context,
return GetSystemModalContainer(target_root, window);
else if (HasTransientParentWindow(window))
return GetContainerForWindow(window->transient_parent());
+ else if (IsWindowDocked(window))
+ return GetContainerById(target_root,
+ internal::kShellWindowId_DockContainer);
return GetAlwaysOnTopController(target_root)->GetContainer(window);
case aura::client::WINDOW_TYPE_CONTROL:
return GetContainerById(
@@ -93,6 +97,9 @@ aura::Window* StackingController::GetDefaultParent(aura::Window* context,
if (IsPanelAttached(window))
return GetContainerById(target_root,
internal::kShellWindowId_PanelContainer);
+ else if (IsWindowDocked(window))
+ return GetContainerById(target_root,
+ internal::kShellWindowId_DockContainer);
else
return GetAlwaysOnTopController(target_root)->GetContainer(window);
case aura::client::WINDOW_TYPE_MENU:

Powered by Google App Engine
This is Rietveld 408576698