OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/wm/dock/docked_window_layout_manager.h" | 5 #include "ash/wm/dock/docked_window_layout_manager.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 wm::GetWindowState(child)->Restore(); | 476 wm::GetWindowState(child)->Restore(); |
477 Relayout(); | 477 Relayout(); |
478 UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED); | 478 UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED); |
479 } | 479 } |
480 | 480 |
481 void DockedWindowLayoutManager::SetChildBounds( | 481 void DockedWindowLayoutManager::SetChildBounds( |
482 aura::Window* child, | 482 aura::Window* child, |
483 const gfx::Rect& requested_bounds) { | 483 const gfx::Rect& requested_bounds) { |
484 // Whenever one of our windows is moved or resized enforce layout. | 484 // Whenever one of our windows is moved or resized enforce layout. |
485 SetChildBoundsDirect(child, requested_bounds); | 485 SetChildBoundsDirect(child, requested_bounds); |
| 486 if (IsPopupOrTransient(child)) |
| 487 return; |
| 488 ShelfLayoutManager* shelf_layout = internal::ShelfLayoutManager::ForLauncher( |
| 489 dock_container_); |
| 490 if (shelf_layout) |
| 491 shelf_layout->UpdateVisibilityState(); |
486 } | 492 } |
487 | 493 |
488 //////////////////////////////////////////////////////////////////////////////// | 494 //////////////////////////////////////////////////////////////////////////////// |
489 // DockLayoutManager, ash::ShellObserver implementation: | 495 // DockLayoutManager, ash::ShellObserver implementation: |
490 | 496 |
491 void DockedWindowLayoutManager::OnDisplayWorkAreaInsetsChanged() { | 497 void DockedWindowLayoutManager::OnDisplayWorkAreaInsetsChanged() { |
492 Relayout(); | 498 Relayout(); |
493 UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_INSETS_CHANGED); | 499 UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_INSETS_CHANGED); |
494 MaybeMinimizeChildrenExcept(dragged_window_); | 500 MaybeMinimizeChildrenExcept(dragged_window_); |
495 } | 501 } |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( | 1069 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( |
1064 const gfx::Rect& keyboard_bounds) { | 1070 const gfx::Rect& keyboard_bounds) { |
1065 // This bounds change will have caused a change to the Shelf which does not | 1071 // This bounds change will have caused a change to the Shelf which does not |
1066 // propagate automatically to this class, so manually recalculate bounds. | 1072 // propagate automatically to this class, so manually recalculate bounds. |
1067 Relayout(); | 1073 Relayout(); |
1068 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); | 1074 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); |
1069 } | 1075 } |
1070 | 1076 |
1071 } // namespace internal | 1077 } // namespace internal |
1072 } // namespace ash | 1078 } // namespace ash |
OLD | NEW |