libweston: Damage the output after the output has been added

Rather than damaging the output before the output has been added with
weston_compositor_add_output, do that afterwards as to avoid scheduling
a repaint for that output *before* actually adding the output.

This would avoid the awkward case where we attempt to set initial power
state to normal, but we can't apply it at that stage.

Signed-off-by: marius vlad <marius.vlad@collabora.com>
This commit is contained in:
marius vlad 2023-04-03 19:45:25 +03:00 committed by Pekka Paalanen
parent 6f9c27ac07
commit 9b1b95ca76

View File

@ -7267,7 +7267,6 @@ weston_output_enable(struct weston_output *output)
wl_list_init(&output->paint_node_z_order_list);
weston_output_update_matrix(output);
weston_output_damage(output);
weston_log("Output '%s' attempts EOTF mode: %s\n", output->name,
weston_eotf_mode_to_str(output->eotf_mode));
@ -7290,6 +7289,7 @@ weston_output_enable(struct weston_output *output)
}
weston_compositor_add_output(output->compositor, output);
weston_output_damage(output);
head_names = weston_output_create_heads_string(output);
weston_log("Output '%s' enabled with head(s) %s\n",