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

Unified Diff: components/exo/wayland/server.cc

Issue 2223973002: Initialize layout_mode with the current value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wayland/server.cc
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index ec5631e44ca1e39f9dea7df6368b68d502d00851..cbb1650783f76ff58bfb28f51306c003981ff3fe 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -30,6 +30,7 @@
#include "ash/common/display/display_info.h"
#include "ash/common/shell_observer.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/display/display_manager.h"
#include "ash/shell.h"
@@ -1586,6 +1587,13 @@ class WaylandRemoteShell : public ash::ShellObserver,
ash::Shell* shell = ash::Shell::GetInstance();
shell->activation_client()->AddObserver(this);
display::Screen::GetScreen()->AddObserver(this);
+
+ layout_mode_ = ash::WmShell::Get()
+ ->maximize_mode_controller()
+ ->IsMaximizeModeWindowManagerEnabled()
+ ? ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET
+ : ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED;
+
SendPrimaryDisplayMetrics();
SendActivated(shell->activation_client()->GetActiveWindow(), nullptr);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698