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

Unified Diff: services/ui/ws/display.cc

Issue 2246593002: Have Display root ServerWindow origin be (0, 0) for all displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 4 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 | « no previous file | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/display.cc
diff --git a/services/ui/ws/display.cc b/services/ui/ws/display.cc
index b247f976c9c1e0043e99575f5da71d8e28f2495c..f93023e760f6d12297b55f36060382a8811c90e2 100644
--- a/services/ui/ws/display.cc
+++ b/services/ui/ws/display.cc
@@ -307,19 +307,20 @@ void Display::OnDisplayClosed() {
void Display::OnViewportMetricsChanged(const ViewportMetrics& old_metrics,
const ViewportMetrics& new_metrics) {
+ gfx::Rect new_bounds(new_metrics.bounds.size());
if (!root_) {
root_.reset(window_server_->CreateServerWindow(
display_manager()->GetAndAdvanceNextRootId(),
ServerWindow::Properties()));
- root_->SetBounds(new_metrics.bounds);
+ root_->SetBounds(new_bounds);
root_->SetVisible(true);
focus_controller_.reset(new FocusController(this, root_.get()));
focus_controller_->AddObserver(this);
InitWindowManagerDisplayRootsIfNecessary();
} else {
- root_->SetBounds(new_metrics.bounds);
+ root_->SetBounds(new_bounds);
for (auto& pair : window_manager_display_root_map_)
- pair.second->root()->SetBounds(new_metrics.bounds);
+ pair.second->root()->SetBounds(new_bounds);
}
display_manager()->OnDisplayUpdate(this);
}
« no previous file with comments | « no previous file | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698