Wayland: Round preferred scale multiplication.

wl_fractional_scale_v1 spec says to round halfway away from zero.
This commit is contained in:
BearOso 2023-08-31 14:01:09 -05:00
parent 94fbbfe0dd
commit 6555feecda
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ std::tuple<int, int> 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)