Chromium Code Reviews| Index: components/exo/wayland/server.cc |
| diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc |
| index 9b6c097c8ae44bbc154f6376e10dc1ab1dbe43b0..55b76ebff49941c5a746012efcb73b8d180c077e 100644 |
| --- a/components/exo/wayland/server.cc |
| +++ b/components/exo/wayland/server.cc |
| @@ -2127,8 +2127,17 @@ class WaylandRemoteShell : public WMHelper::MaximizeModeObserver, |
| needs_send_display_metrics_ = false; |
| const display::Screen* screen = display::Screen::GetScreen(); |
| + display::Display primary_display = screen->GetPrimaryDisplay(); |
| if (IsMultiDisplaySupported()) { |
| + // TODO(domlaskowski): Send real DSFs once client selects DPI using DSF. |
|
reveman
2017/03/28 07:12:21
I don't understand this TODO. Can you link to a bu
Dominik Laskowski
2017/03/30 01:21:43
Updated comment.
|
| + double device_scale_factor = |
| + WMHelper::GetInstance() |
| + ->GetDisplayInfo(display::Display::HasInternalDisplay() |
| + ? display::Display::InternalDisplayId() |
| + : primary_display.id()) |
| + .device_scale_factor(); |
|
oshima
2017/03/28 12:46:55
This value may change (as primary display may chan
Dominik Laskowski
2017/03/30 01:21:44
On a device without an internal display, the curso
|
| + |
| for (const auto& display : screen->GetAllDisplays()) { |
| const gfx::Rect& bounds = display.bounds(); |
| const gfx::Insets& insets = display.GetWorkAreaInsets(); |
| @@ -2140,13 +2149,12 @@ class WaylandRemoteShell : public WMHelper::MaximizeModeObserver, |
| bounds.x(), bounds.y(), bounds.width(), bounds.height(), |
| insets.left(), insets.top(), insets.right(), insets.bottom(), |
| OutputTransform(display.rotation()), |
| - wl_fixed_from_double(display.device_scale_factor())); |
| + wl_fixed_from_double(device_scale_factor)); |
| } |
| zcr_remote_shell_v1_send_configure(remote_shell_resource_, layout_mode_); |
| } |
| - display::Display primary_display = screen->GetPrimaryDisplay(); |
| const gfx::Insets& insets = primary_display.GetWorkAreaInsets(); |
| zcr_remote_shell_v1_send_configuration_changed( |