compositor: round off fractions

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>
diff --git a/src/compositor.c b/src/compositor.c
index 507fcda..ae1a0fd 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -312,6 +312,10 @@
 {
 	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,