OLD | NEW |
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/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 | 814 |
815 void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) { | 815 void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) { |
816 if (limiter_) | 816 if (limiter_) |
817 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs); | 817 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs); |
818 const internal::DisplayInfo& display_info = | 818 const internal::DisplayInfo& display_info = |
819 GetDisplayManager()->GetDisplayInfo(display.id()); | 819 GetDisplayManager()->GetDisplayInfo(display.id()); |
820 DCHECK(!display_info.bounds_in_pixel().IsEmpty()); | 820 DCHECK(!display_info.bounds_in_pixel().IsEmpty()); |
821 | 821 |
822 UpdateDisplayBoundsForLayout(); | 822 UpdateDisplayBoundsForLayout(); |
823 aura::RootWindow* root = root_windows_[display.id()]; | 823 aura::RootWindow* root = root_windows_[display.id()]; |
| 824 root->SetHostBounds(display_info.bounds_in_pixel()); |
824 SetDisplayPropertiesOnHostWindow(root, display); | 825 SetDisplayPropertiesOnHostWindow(root, display); |
825 root->SetHostBounds(display_info.bounds_in_pixel()); | |
826 } | 826 } |
827 | 827 |
828 void DisplayController::OnDisplayAdded(const gfx::Display& display) { | 828 void DisplayController::OnDisplayAdded(const gfx::Display& display) { |
829 if (limiter_) | 829 if (limiter_) |
830 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs); | 830 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs); |
831 | 831 |
832 if (primary_root_window_for_replace_) { | 832 if (primary_root_window_for_replace_) { |
833 DCHECK(root_windows_.empty()); | 833 DCHECK(root_windows_.empty()); |
834 primary_display_id = display.id(); | 834 primary_display_id = display.id(); |
835 root_windows_[display.id()] = primary_root_window_for_replace_; | 835 root_windows_[display.id()] = primary_root_window_for_replace_; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 for (size_t i = 0; i < root_windows.size(); ++i) { | 1014 for (size_t i = 0; i < root_windows.size(); ++i) { |
1015 std::string name = | 1015 std::string name = |
1016 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; | 1016 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; |
1017 gfx::AcceleratedWidget xwindow = root_windows[i]->GetAcceleratedWidget(); | 1017 gfx::AcceleratedWidget xwindow = root_windows[i]->GetAcceleratedWidget(); |
1018 XStoreName(ui::GetXDisplay(), xwindow, name.c_str()); | 1018 XStoreName(ui::GetXDisplay(), xwindow, name.c_str()); |
1019 } | 1019 } |
1020 #endif | 1020 #endif |
1021 } | 1021 } |
1022 | 1022 |
1023 } // namespace ash | 1023 } // namespace ash |
OLD | NEW |