diff --git a/CHANGELOG.md b/CHANGELOG.md index 5541fa3463..8fcbdae819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - On Wayland, bump `smithay-client-toolkit` to 0.15.1. - On Wayland, implement `request_user_attention` with `xdg_activation_v1`. - On X11, emit missing `WindowEvent::ScaleFactorChanged` when the only monitor gets reconnected. +- On X11, if RANDR based scale factor is higher than 20 reset it to 1 # 0.25.0 (2021-05-15) diff --git a/src/platform_impl/linux/x11/util/randr.rs b/src/platform_impl/linux/x11/util/randr.rs index b9258c68f1..0013b901d7 100644 --- a/src/platform_impl/linux/x11/util/randr.rs +++ b/src/platform_impl/linux/x11/util/randr.rs @@ -27,7 +27,11 @@ pub fn calc_dpi_factor( // Quantize 1/12 step size let dpi_factor = ((ppmm * (12.0 * 25.4 / 96.0)).round() / 12.0).max(1.0); assert!(validate_scale_factor(dpi_factor)); - dpi_factor + if dpi_factor <= 20. { + dpi_factor + } else { + 1. + } } impl XConnection {