From 65e9139764ec5192b4d7d31758a07e4e16933d0c Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 Dec 2019 21:45:46 +0100 Subject: x11: fix --hidpi-window-scale=no on hidpi screens In this combination, the [current-]window-scale properties still incorrectly applied scaling. For some reason, vo_calc_window_geometry2() handled this option (basically ignored the dpi_scale parameter passed to it), but since the DPI compensation for window-scale is implemented in x11_common.c, we need to check and honor this option here too. (What a mess.) --- video/out/x11_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 09248ddfd0..92dbfc2aa3 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -623,7 +623,7 @@ int vo_x11_init(struct vo *vo) double dpi_x = x11->ws_width * 25.4 / w_mm; double dpi_y = x11->ws_height * 25.4 / h_mm; double base_dpi = 96; - if (isfinite(dpi_x) && isfinite(dpi_y)) { + if (isfinite(dpi_x) && isfinite(dpi_y) && x11->opts->hidpi_window_scale) { int s_x = lrint(MPCLAMP(dpi_x / base_dpi, 0, 10)); int s_y = lrint(MPCLAMP(dpi_y / base_dpi, 0, 10)); if (s_x == s_y && s_x > 1 && s_x < 10) { -- cgit v1.2.3