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

Unified Diff: ash/mus/window_manager.cc

Issue 2434923002: Handle modified displays in mustash. (Closed)
Patch Set: Fixes after initial review. Created 4 years, 2 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
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index b72aa50567abffd463384d88d6714b256d5a3a2e..f86e19887346931debcb6ba91d1ca86a56ba5931 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -333,6 +333,19 @@ void WindowManager::OnWmDisplayRemoved(ui::Window* window) {
DestroyRootWindowController(iter->get());
}
+void WindowManager::OnWmDisplayModified(const display::Display& display) {
+ for (auto& controller : root_window_controllers_) {
+ if (controller->display().id() == display.id()) {
+ controller->set_display(display);
sky 2016/10/19 23:37:59 Can you make set_display() call to UpdateDisplay()
kylechar 2016/10/20 15:04:19 I could do that. In general it seems wrong to me t
sky 2016/10/20 15:33:24 Good point. I would still think RootWindowControll
kylechar 2016/10/20 18:31:29 Done.
+ screen_->display_list()->UpdateDisplay(display);
+ // The root window will be resized by the window server.
+ return;
+ }
+ }
+
+ NOTREACHED();
+}
+
void WindowManager::OnWmPerformMoveLoop(
ui::Window* window,
ui::mojom::MoveLoopSource source,

Powered by Google App Engine
This is Rietveld 408576698