[PATCH weston 4/4] rpi: launcher must init before udev-seat
ppaalanen at gmail.com
ppaalanen at gmail.com
Wed Dec 4 05:34:48 PST 2013
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
udev-seat will call weston_launcher_open(), so we better init launcher
first. Fixes a segfault.
Cc: Jonas Ådahl <jadahl at gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
src/compositor-rpi.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/compositor-rpi.c b/src/compositor-rpi.c
index 7d95e83..88ea8e0 100644
--- a/src/compositor-rpi.c
+++ b/src/compositor-rpi.c
@@ -511,13 +511,6 @@ rpi_compositor_create(struct wl_display *display, int *argc, char *argv[],
goto out_compositor;
}
- if (udev_input_init(&compositor->input,
- &compositor->base,
- compositor->udev, "seat0") != 0) {
- weston_log("Failed to initialize udev input.\n");
- goto out_udev;
- }
-
compositor->session_listener.notify = session_notify;
wl_signal_add(&compositor->base.session_signal,
&compositor ->session_listener);
@@ -525,7 +518,7 @@ rpi_compositor_create(struct wl_display *display, int *argc, char *argv[],
weston_launcher_connect(&compositor->base, param->tty, "seat0");
if (!compositor->base.launcher) {
weston_log("Failed to initialize tty.\n");
- goto out_udev_input;
+ goto out_udev;
}
compositor->base.destroy = rpi_compositor_destroy;
@@ -537,6 +530,13 @@ 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,
@@ -552,7 +552,7 @@ 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_launcher;
+ goto out_udev_input;
if (rpi_output_create(compositor, param->output_transform) < 0)
goto out_renderer;
@@ -562,12 +562,12 @@ rpi_compositor_create(struct wl_display *display, int *argc, char *argv[],
out_renderer:
compositor->base.renderer->destroy(&compositor->base);
-out_launcher:
- weston_launcher_destroy(compositor->base.launcher);
-
out_udev_input:
udev_input_destroy(&compositor->input);
+out_launcher:
+ weston_launcher_destroy(compositor->base.launcher);
+
out_udev:
udev_unref(compositor->udev);
--
1.8.3.2
More information about the wayland-devel
mailing list