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

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

Issue 2491493004: Fix root ServerWindow size. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: services/ui/ws/display.cc
diff --git a/services/ui/ws/display.cc b/services/ui/ws/display.cc
index d9b1c1e72b1cd45f6f20a3bf607e326f9dbb97c6..f7a1ed1d3b2b553917445fb4b0a24054b8a2fe2c 100644
--- a/services/ui/ws/display.cc
+++ b/services/ui/ws/display.cc
@@ -294,12 +294,11 @@ void Display::OnNativeCaptureLost() {
display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId);
}
-void Display::OnViewportMetricsChanged(
- const display::ViewportMetrics& new_metrics) {
- if (!root_ || root_->bounds().size() == new_metrics.bounds.size())
+void Display::UpdateRootWindowSize(const gfx::Size& new_size) {
+ if (root_->bounds().size() == new_size)
return;
- gfx::Rect new_bounds(new_metrics.bounds.size());
+ gfx::Rect new_bounds(new_size);
root_->SetBounds(new_bounds);
for (auto& pair : window_manager_display_root_map_)
pair.second->root()->SetBounds(new_bounds);

Powered by Google App Engine
This is Rietveld 408576698