compositor: Init output listeners in weston_view if it's not on any output

If we don't add the listener back to a new output, we have to init the
list links so we can remove them unconditionally.

Closes: https://bugs.freedesktop.org/show_bug.cgi?id=73415
This commit is contained in:
Kristian Høgsberg 2014-01-09 22:41:48 -08:00
parent 8ca9544e06
commit b0fb25dedc
1 changed files with 3 additions and 0 deletions

View File

@ -921,6 +921,9 @@ weston_view_assign_output(struct weston_view *ev)
&ev->output_move_listener);
wl_signal_add(&new_output->destroy_signal,
&ev->output_destroy_listener);
} else {
wl_list_init(&ev->output_move_listener.link);
wl_list_init(&ev->output_destroy_listener.link);
}
ev->output = new_output;