compositor: Remove output from list in weston_output_destroy()

When destroying ouputs, they would sometimes be removed before the call
to weston_output_destory() and sometimes after, depending on the
backend. Now the output is remove withing that function so the behavior
is standard across all backends.
This commit is contained in:
Ander Conselvan de Oliveira 2013-12-13 22:10:50 +02:00 committed by Kristian Høgsberg
parent f54fa4db2b
commit f749fc3782
5 changed files with 2 additions and 4 deletions

View File

@ -1146,7 +1146,6 @@ drm_output_destroy(struct weston_output *output_base)
weston_plane_release(&output->cursor_plane);
weston_output_destroy(&output->base);
wl_list_remove(&output->base.link);
free(output);
}

View File

@ -692,7 +692,6 @@ fbdev_output_destroy(struct weston_output *base)
}
/* Remove the output. */
wl_list_remove(&output->base.link);
weston_output_destroy(&output->base);
free(output);

View File

@ -278,7 +278,6 @@ rpi_output_destroy(struct weston_output *base)
*/
rpi_flippipe_release(&output->flippipe);
wl_list_remove(&output->base.link);
weston_output_destroy(&output->base);
vc_dispmanx_display_close(output->display);

View File

@ -483,7 +483,6 @@ x11_output_destroy(struct weston_output *output_base)
struct x11_compositor *compositor =
(struct x11_compositor *)output->base.compositor;
wl_list_remove(&output->base.link);
wl_event_source_remove(output->finish_frame_timer);
if (compositor->use_pixman) {

View File

@ -2996,6 +2996,8 @@ bind_output(struct wl_client *client,
WL_EXPORT void
weston_output_destroy(struct weston_output *output)
{
wl_list_remove(&output->link);
wl_signal_emit(&output->destroy_signal, output);
free(output->name);