| Index: ui/views/widget/desktop_aura/desktop_screen_x11.cc
|
| diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
|
| index 019688fb9463fb518681202d611a0fc90160a6b2..8673c20af50e65a6446bcce99132759cc5d0aa11 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc
|
| +++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
|
| @@ -295,6 +295,13 @@ std::vector<gfx::Display> DesktopScreenX11::BuildDisplaysFromXRandRInfo() {
|
| }
|
|
|
| float device_scale_factor = 1.0f;
|
| + {
|
| + // As per-display scale factor is not supported right now,
|
| + // the X11 root window's scale factor is always used.
|
| + // This is what users can change using e.g. xrandr -dpi 96
|
| + std::vector<gfx::Display> fallback_displays = GetFallbackDisplayList();
|
| + device_scale_factor = fallback_displays[0].device_scale_factor();
|
| + }
|
| for (int i = 0; i < resources->noutput; ++i) {
|
| RROutput output_id = resources->outputs[i];
|
| gfx::XScopedPtr<XRROutputInfo,
|
| @@ -321,14 +328,6 @@ std::vector<gfx::Display> DesktopScreenX11::BuildDisplaysFromXRandRInfo() {
|
| gfx::Display display(display_id, crtc_bounds);
|
|
|
| if (!gfx::Display::HasForceDeviceScaleFactor()) {
|
| - if (i == 0 && !ui::IsDisplaySizeBlackListed(
|
| - gfx::Size(output_info->mm_width, output_info->mm_height))) {
|
| - // As per display scale factor is not supported right now,
|
| - // the primary display's scale factor is always used.
|
| - device_scale_factor = GetDeviceScaleFactor(crtc->width,
|
| - output_info->mm_width);
|
| - DCHECK_LE(1.0f, device_scale_factor);
|
| - }
|
| display.SetScaleAndBounds(device_scale_factor, crtc_bounds);
|
| }
|
|
|
|
|