fbdev: open launcher only once
We currently call launcher_connect() twice, which is redundant and amazingly works (ugh?). Fix this and connect only once to the launcher.
This commit is contained in:
committed by
Kristian Høgsberg
parent
e05a0cd92c
commit
1641d14b82
+2
-10
@@ -883,15 +883,6 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
|
|||||||
config) < 0)
|
config) < 0)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
|
||||||
/* Check if we run fbdev-backend using weston-launch */
|
|
||||||
compositor->base.launcher =
|
|
||||||
weston_launcher_connect(&compositor->base, param->tty);
|
|
||||||
if (compositor->base.launcher == NULL && geteuid() != 0) {
|
|
||||||
weston_log("fatal: fbdev backend should be run "
|
|
||||||
"using weston-launch binary or as root\n");
|
|
||||||
goto out_compositor;
|
|
||||||
}
|
|
||||||
|
|
||||||
compositor->udev = udev_new();
|
compositor->udev = udev_new();
|
||||||
if (compositor->udev == NULL) {
|
if (compositor->udev == NULL) {
|
||||||
weston_log("Failed to initialize udev context.\n");
|
weston_log("Failed to initialize udev context.\n");
|
||||||
@@ -905,7 +896,8 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
|
|||||||
compositor->base.launcher =
|
compositor->base.launcher =
|
||||||
weston_launcher_connect(&compositor->base, param->tty);
|
weston_launcher_connect(&compositor->base, param->tty);
|
||||||
if (!compositor->base.launcher) {
|
if (!compositor->base.launcher) {
|
||||||
weston_log("Failed to set up launcher.\n");
|
weston_log("fatal: fbdev backend should be run "
|
||||||
|
"using weston-launch binary or as root\n");
|
||||||
goto out_udev;
|
goto out_udev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user