https://bugs.kde.org/show_bug.cgi?id=481460

--- Comment #14 from [email protected] ---
(In reply to fanzhuyifan from comment #13)
> Currently toXNative [0] rounds halfs away from 0, and we get increasing
> window sizes. If we change it to round halfs towards 0, we get decreasing
> window sizes. If we change it to round halfs to even, the problem seems to
> disappear.
> 
> It seems the scale 1.25 is special because it can exactly generate integer +
> 0.5 when multiplied by an integer. I have no idea what the root cause of the
> problem is though. (This hypothesis is consistent with the problem also
> being reported for scale=1.5 and and scale=2.5).
> 
> [0]
> https://invent.kde.org/plasma/kwin/-/blob/master/src/utils/xcbutils.
> cpp?ref_type=heads#L624

The actual problem seems to be that the code is rounding both frame size and
client size to have integral XNative sizes.
However, their difference, the border size, does not always have integral
XNative sizes [1]. Hence, we get cycles of rounding, and in this particular
case, this leads to infinitely growing window sizes when we round up.

[1]
https://invent.kde.org/plasma/kwin/-/blob/master/src/x11window.cpp?ref_type=heads#L2834

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to