diff --git a/xpra/util/parsing.py b/xpra/util/parsing.py index cc375f9b2e..42ea017970 100644 --- a/xpra/util/parsing.py +++ b/xpra/util/parsing.py @@ -200,7 +200,13 @@ def parse_scaling_value(v) -> tuple[int, int] | None: if not v: return None if v.endswith("%"): - return float(v[:1]).as_integer_ratio() + num = int(v[:-1]) + denom = 100 + for div in (2, 5): + while (num % div) == 0 and (denom % div) == 0: + num = num // div + denom = denom // div + return num, denom values = v.replace("/", ":").replace(",", ":").split(":", 1) values = [int(x) for x in values] for x in values: