From 6555feecda5a4294eab7fae6e02f4ae947647988 Mon Sep 17 00:00:00 2001 From: BearOso Date: Thu, 31 Aug 2023 14:01:09 -0500 Subject: [PATCH] Wayland: Round preferred scale multiplication. wl_fractional_scale_v1 spec says to round halfway away from zero. --- common/video/wayland_surface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/video/wayland_surface.cpp b/common/video/wayland_surface.cpp index 3628747f..626fc5c1 100644 --- a/common/video/wayland_surface.cpp +++ b/common/video/wayland_surface.cpp @@ -153,7 +153,7 @@ std::tuple WaylandSurface::get_size() return { metrics.width * metrics.scale, metrics.height * metrics.scale }; } - return { metrics.width * actual_scale, metrics.height * actual_scale }; + return { round(metrics.width * actual_scale), round(metrics.height * actual_scale) }; } void WaylandSurface::resize(Metrics m)