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

Side by Side Diff: ash/root_window_controller.cc

Issue 10795027: Move a window if the sceren bounds being set is in other display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjust for win_aura Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/display/display_controller.h" 9 #include "ash/display/display_controller.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 }; 63 };
64 for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) { 64 for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) {
65 int id = kContainerIdsToMove[i]; 65 int id = kContainerIdsToMove[i];
66 aura::Window* src_container = Shell::GetContainer(src, id); 66 aura::Window* src_container = Shell::GetContainer(src, id);
67 aura::Window* dst_container = Shell::GetContainer(dst, id); 67 aura::Window* dst_container = Shell::GetContainer(dst, id);
68 aura::Window::Windows children = src_container->children(); 68 aura::Window::Windows children = src_container->children();
69 for (aura::Window::Windows::iterator iter = children.begin(); 69 for (aura::Window::Windows::iterator iter = children.begin();
70 iter != children.end(); ++iter) { 70 iter != children.end(); ++iter) {
71 aura::Window* window = *iter; 71 aura::Window* window = *iter;
72 // Don't move modal screen. 72 // Don't move modal screen.
73 if ((id == internal::kShellWindowId_SystemModalContainer || 73 if (internal::SystemModalContainerLayoutManager::IsModalScreen(window))
74 id == internal::kShellWindowId_LockSystemModalContainer) &&
75 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_NONE) {
76 continue; 74 continue;
77 } 75
78 // Update the restore bounds to make it relative to the display. 76 // Update the restore bounds to make it relative to the display.
79 gfx::Rect restore_bounds; 77 gfx::Rect restore_bounds;
80 if (internal::DisplayController::IsVirtualScreenCoordinatesEnabled()) 78 if (internal::DisplayController::IsVirtualScreenCoordinatesEnabled())
81 restore_bounds = GetRestoreBoundsInParent(window); 79 restore_bounds = GetRestoreBoundsInParent(window);
82 dst_container->AddChild(window); 80 dst_container->AddChild(window);
83 if (!restore_bounds.IsEmpty()) 81 if (!restore_bounds.IsEmpty())
84 SetRestoreBoundsInParent(window, restore_bounds); 82 SetRestoreBoundsInParent(window, restore_bounds);
85 } 83 }
86 } 84 }
87 } 85 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // Restore focused or active window if it's still alive. 310 // Restore focused or active window if it's still alive.
313 if (focused && tracker.Contains(focused) && dst->Contains(focused)) { 311 if (focused && tracker.Contains(focused) && dst->Contains(focused)) {
314 dst->GetFocusManager()->SetFocusedWindow(focused, NULL); 312 dst->GetFocusManager()->SetFocusedWindow(focused, NULL);
315 } else if (active && tracker.Contains(active) && dst->Contains(active)) { 313 } else if (active && tracker.Contains(active) && dst->Contains(active)) {
316 activation_client->ActivateWindow(active); 314 activation_client->ActivateWindow(active);
317 } 315 }
318 } 316 }
319 317
320 } // namespace internal 318 } // namespace internal
321 } // namespace ash 319 } // namespace ash
OLDNEW
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698