[PATCH weston 1/2] compositor: Update surface transform before assigning output.

Scott Moreau oreaus at gmail.com
Sat Aug 11 20:57:33 PDT 2012

If weston_surface_assign_output() is called for a surface without calling
weston_surface_update_transform() first, the transform region will be empty
ultimately causing output assignment failure. Here we check if the region
is empty and update it accordingly before using code that relies on it.

This bug was exposed by 982387011ff. The problem case was that tooltips did not
show while the compositor was idle until other damage happens, such as moving
the mouse.
 src/compositor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compositor.c b/src/compositor.c
index 30a1f4f..7c161d0 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1381,6 +1381,9 @@ weston_surface_assign_output(struct weston_surface *es)
 	uint32_t max, area, mask;
 	pixman_box32_t *e;
+	if (!pixman_region32_not_empty(&es->transform.boundingbox))
+		weston_surface_update_transform(es);
 	new_output = NULL;
 	max = 0;
 	mask = 0;

More information about the wayland-devel mailing list