On Tue, 04 Feb 2014 08:47:55 +0100 Emilio Pozuelo Monfort <[email protected]> wrote:
> On 03/02/14 20:00, Pekka Paalanen wrote: > > On Mon, 3 Feb 2014 16:57:27 +0100 > > [email protected] wrote: > > > >> From: Emilio Pozuelo Monfort <[email protected]> > >> > >> The input initialization code assumes the outputs have already > >> been initialized; thus create the outputs first. This fixes a > >> segfault upon startup. It is also what the drm and fbdev backends > >> do. > >> --- > >> src/compositor-rpi.c | 19 ++++++++----------- > >> 1 file changed, 8 insertions(+), 11 deletions(-) > >> > >> diff --git a/src/compositor-rpi.c b/src/compositor-rpi.c > >> index 399090d..e7c0e0d 100644 > >> --- a/src/compositor-rpi.c > >> +++ b/src/compositor-rpi.c > >> @@ -527,13 +527,6 @@ rpi_compositor_create(struct wl_display > >> *display, int *argc, char *argv[], weston_log("Dispmanx planes > >> are %s buffered.\n", compositor->single_buffer ? "single" : > >> "double"); > >> - if (udev_input_init(&compositor->input, > >> - &compositor->base, > >> - compositor->udev, "seat0") != 0) { > >> - weston_log("Failed to initialize udev input.\n"); > >> - goto out_launcher; > >> - } > >> - > >> for (key = KEY_F1; key < KEY_F9; key++) > >> weston_compositor_add_key_binding(&compositor->base, > >> key, MODIFIER_CTRL | MODIFIER_ALT, > >> @@ -549,19 +542,23 @@ rpi_compositor_create(struct wl_display > >> *display, int *argc, char *argv[], bcm_host_init(); > >> > >> if (rpi_renderer_create(&compositor->base, > >> ¶m->renderer) < 0) > >> - goto out_udev_input; > >> + goto out_launcher; > >> > >> if (rpi_output_create(compositor, > >> param->output_transform) < 0) goto out_renderer; > >> > >> + if (udev_input_init(&compositor->input, > >> + &compositor->base, > >> + compositor->udev, "seat0") != 0) { > >> + weston_log("Failed to initialize udev input.\n"); > >> + goto out_renderer; > > > > Hi, > > > > if input init fails, was there something to clean up from > > rpi_output_create()? Otherwise looks fine. > > There's nothing to clean up. The newly created rpi_output structure > has rpi_output_destroy as its destroy callback and that should be > enough. Ok, I didn't realize weston_compositor_shutdown() ends up calling rpi_output_destroy. Let's merge it, then. Thanks, pq _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
