compositor: Move weston-launch socket lookup to drm backend
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 23 Jul 2013 19:24:00 +0000 (12:24 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 25 Jul 2013 16:51:46 +0000 (09:51 -0700)
This is the only backend that uses the launcher, so let's set it
up there.

src/compositor-drm.c
src/compositor.c

index 45e7e9b..5a5d79c 100644 (file)
@@ -2468,6 +2468,8 @@ drm_compositor_create(struct wl_display *display,
        }
 
        /* Check if we run drm-backend using weston-launch */
+       ec->base.launcher_sock =
+               weston_environment_get_fd("WESTON_LAUNCHER_SOCK");
        if (ec->base.launcher_sock == -1 && geteuid() != 0) {
                weston_log("fatal: drm backend should be run "
                           "using weston-launch binary or as root\n");
index 2cadb45..ddb5362 100644 (file)
@@ -2873,7 +2873,6 @@ weston_compositor_init(struct weston_compositor *ec,
        wl_signal_init(&ec->update_input_panel_signal);
        wl_signal_init(&ec->seat_created_signal);
        wl_signal_init(&ec->output_created_signal);
-       ec->launcher_sock = weston_environment_get_fd("WESTON_LAUNCHER_SOCK");
 
        ec->output_id_pool = 0;