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

Side by Side Diff: services/ui/ws/display.cc

Issue 2491493004: Fix root ServerWindow size. (Closed)
Patch Set: Fixes. 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/display_manager.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/ws/display.h" 5 #include "services/ui/ws/display.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 ->OnUserActivity(); 288 ->OnUserActivity();
289 } 289 }
290 290
291 void Display::OnNativeCaptureLost() { 291 void Display::OnNativeCaptureLost() {
292 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); 292 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot();
293 if (display_root) 293 if (display_root)
294 display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId); 294 display_root->window_manager_state()->SetCapture(nullptr, kInvalidClientId);
295 } 295 }
296 296
297 void Display::OnViewportMetricsChanged( 297 void Display::OnViewportMetricsChanged(
298 const display::ViewportMetrics& new_metrics) { 298 const display::ViewportMetrics& metrics) {
299 if (!root_ || root_->bounds().size() == new_metrics.bounds.size()) 299 if (root_->bounds().size() == metrics.pixel_size)
300 return; 300 return;
301 301
302 gfx::Rect new_bounds(new_metrics.bounds.size()); 302 gfx::Rect new_bounds(metrics.pixel_size);
303 root_->SetBounds(new_bounds); 303 root_->SetBounds(new_bounds);
304 for (auto& pair : window_manager_display_root_map_) 304 for (auto& pair : window_manager_display_root_map_)
305 pair.second->root()->SetBounds(new_bounds); 305 pair.second->root()->SetBounds(new_bounds);
306 } 306 }
307 307
308 bool Display::CanHaveActiveChildren(ServerWindow* window) const { 308 bool Display::CanHaveActiveChildren(ServerWindow* window) const {
309 return window && activation_parents_.Contains(window); 309 return window && activation_parents_.Contains(window);
310 } 310 }
311 311
312 void Display::OnActivationChanged(ServerWindow* old_active_window, 312 void Display::OnActivationChanged(ServerWindow* old_active_window,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 383 }
384 384
385 void Display::OnWindowManagerWindowTreeFactoryReady( 385 void Display::OnWindowManagerWindowTreeFactoryReady(
386 WindowManagerWindowTreeFactory* factory) { 386 WindowManagerWindowTreeFactory* factory) {
387 if (!binding_) 387 if (!binding_)
388 CreateWindowManagerDisplayRootFromFactory(factory); 388 CreateWindowManagerDisplayRootFromFactory(factory);
389 } 389 }
390 390
391 } // namespace ws 391 } // namespace ws
392 } // namespace ui 392 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698