Round off fractions from non-transformed surface position coordinates.
Transformed surface moved by a client may have non-integer position
coordinates. That is required to prevent drifting on continuous
resizing.
We can round the position to integers when the surface is not (anymore)
transformed.
This change may fix a rounding inconsistency in the opaque region setup,
where the rectangle is initialised from the coordinates without explicit
rounding operation.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
{
surface->transform.enabled = 0;
+ /* round off fractions when not transformed */
+ surface->geometry.x = roundf(surface->geometry.x);
+ surface->geometry.y = roundf(surface->geometry.y);
+
pixman_region32_init_rect(&surface->transform.boundingbox,
surface->geometry.x,
surface->geometry.y,