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.
dev
Ander Conselvan de Oliveira 11 years ago committed by Kristian Høgsberg
parent f54fa4db2b
commit f749fc3782
  1. 1
      src/compositor-drm.c
  2. 1
      src/compositor-fbdev.c
  3. 1
      src/compositor-rpi.c
  4. 1
      src/compositor-x11.c
  5. 2
      src/compositor.c

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

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

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

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

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

Loading…
Cancel
Save