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:
committed by
Kristian Høgsberg
parent
8ea818fb00
commit
231ba171c6
+1
-1
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user