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

Unified Diff: ash/display/screen_position_controller.cc

Issue 10830365: Initial crack at new workspace behavior. Each workspace now has its (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « ash/ash_switches.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/screen_position_controller.cc
diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc
index 1deb4e20972d41538e558c7764390b1e35c9fd38..c3989373f964721e44fad1c28a45cb45a9f1cdc5 100644
--- a/ash/display/screen_position_controller.cc
+++ b/ash/display/screen_position_controller.cc
@@ -5,10 +5,12 @@
#include "ash/display/screen_position_controller.h"
#include "ash/display/display_controller.h"
+#include "ash/root_window_controller.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/system_modal_container_layout_manager.h"
#include "ash/wm/window_properties.h"
+#include "ash/wm/workspace_controller.h"
#include "ui/aura/client/activation_client.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/stacking_client.h"
@@ -97,8 +99,7 @@ void ScreenPositionController::SetBounds(aura::Window* window,
aura::Window* dst_container = NULL;
if (dst_root != window->GetRootWindow()) {
int container_id = window->parent()->id();
- // All containers that uses screen coordinates must have valid
- // window ids.
+ // All containers that uses screen coordinates must have valid window ids.
DCHECK_GE(container_id, 0);
// Don't move modal screen.
if (!SystemModalContainerLayoutManager::IsModalScreen(window))
@@ -117,6 +118,12 @@ void ScreenPositionController::SetBounds(aura::Window* window,
if (active && focused != active)
tracker.Add(active);
+ if (dst_container->id() == kShellWindowId_WorkspaceContainer) {
+ dst_container =
+ GetRootWindowController(dst_root)->workspace_controller()->
+ GetParentForNewWindow(window);
+ }
+
dst_container->AddChild(window);
MoveAllTransientChildrenToNewRoot(display, window);
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698