compositor: Move weston-launch socket lookup to drm backend

This is the only backend that uses the launcher, so let's set it
up there.
This commit is contained in:
Kristian Høgsberg 2013-07-23 12:24:00 -07:00
parent 9e5d7d17a7
commit 3c95e70496
2 changed files with 2 additions and 1 deletions

View 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");

View 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;