compositor: Always assign an output when updating a surface transform

Also make all the callers of weston_surface_assign_output() update the
transform instead. This makes sure that when the surface is assigned an
output its bouding box is valid.

This fixes a bug where a newly created surface would have a NULL output
assigned. This would cause weston_surface_schedule_repaint() to not
schedule a repaint, preventing the surface to be shown until something
else caused a repaint.
This commit is contained in:
Ander Conselvan de Oliveira
2012-09-14 16:12:04 +03:00
committed by Kristian Høgsberg
parent 8ea818fb00
commit 231ba171c6
5 changed files with 12 additions and 14 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ handle_surface(struct test_client *client)
surface = (struct weston_surface *) resource;
weston_surface_configure(surface, 100, 100, 200, 200);
weston_surface_assign_output(surface);
weston_surface_update_transform(surface);
weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0);
wl_list_insert(&layer->surface_list, &surface->layer_link);
weston_surface_damage(surface);
+1 -1
View File
@@ -178,7 +178,7 @@ handle_surface(struct test_client *client)
surface = (struct weston_surface *) resource;
weston_surface_configure(surface, 100, 100, 200, 200);
weston_surface_assign_output(surface);
weston_surface_update_transform(surface);
weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0);
data->layer = malloc(sizeof *data->layer);