summaryrefslogtreecommitdiff
path: root/compositor
diff options
context:
space:
mode:
authorQuentin Glidic <sardemff7+git@sardemff7.net>2016-12-02 14:17:08 +0100
committerQuentin Glidic <sardemff7+git@sardemff7.net>2017-01-17 18:24:58 +0100
commitda01c1d105e1eb72ede863495dd60552b504df05 (patch)
treeefe602399070deffd32eef89055c723daecac987 /compositor
parent8af2beccbd91c2f555eb5e5aa4f8e0455ab28eff (diff)
weston: Make the shell entrypoint specific
This avoids loading a shell as a module, so we are sure to have only one shell loaded at a time. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'compositor')
-rw-r--r--compositor/main.c17
-rw-r--r--compositor/weston.h3
2 files changed, 19 insertions, 1 deletions
diff --git a/compositor/main.c b/compositor/main.c
index af093f13..74b404bd 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -829,6 +829,21 @@ wet_load_module(struct weston_compositor *compositor,
}
static int
+wet_load_shell(struct weston_compositor *compositor,
+ const char *name, int *argc, char *argv[])
+{
+ int (*shell_init)(struct weston_compositor *ec,
+ int *argc, char *argv[]);
+
+ shell_init = wet_load_module_entrypoint(name, "wet_shell_init");
+ if (!shell_init)
+ return -1;
+ if (shell_init(compositor, argc, argv) < 0)
+ return -1;
+ return 0;
+}
+
+static int
load_modules(struct weston_compositor *ec, const char *modules,
int *argc, char *argv[])
{
@@ -1895,7 +1910,7 @@ int main(int argc, char *argv[])
weston_config_section_get_string(section, "shell", &shell,
"desktop-shell.so");
- if (load_modules(ec, shell, &argc, argv) < 0)
+ if (wet_load_shell(ec, shell, &argc, argv) < 0)
goto out;
weston_config_section_get_string(section, "modules", &modules, "");
diff --git a/compositor/weston.h b/compositor/weston.h
index 6229b34b..5708aca4 100644
--- a/compositor/weston.h
+++ b/compositor/weston.h
@@ -64,6 +64,9 @@ void *
wet_load_module_entrypoint(const char *name, const char *entrypoint);
int
+wet_shell_init(struct weston_compositor *ec,
+ int *argc, char *argv[]);
+int
wet_module_init(struct weston_compositor *ec,
int *argc, char *argv[]);
int