From a985da48a7c572b77db0bd1a7bae1fc75b0c7f93 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 22 Aug 2013 17:28:03 -0500 Subject: [PATCH] Add a --shell option to override the default desktop-shell Signed-off-by: Jason Ekstrand --- src/compositor.c | 12 ++++++++++-- weston.ini | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 78351eb1..74f0aab4 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3256,6 +3256,7 @@ usage(int error_code) " -B, --backend=MODULE\tBackend module, one of drm-backend.so,\n" "\t\t\t\tfbdev-backend.so, x11-backend.so or\n" "\t\t\t\twayland-backend.so\n" + " --shell=MODULE\tShell module, defaults to desktop-shell.so\n" " -S, --socket=NAME\tName of socket to listen on\n" " -i, --idle-time=SECS\tIdle time in seconds\n" " --modules\t\tLoad the comma-separated list of modules\n" @@ -3343,6 +3344,7 @@ int main(int argc, char *argv[]) struct weston_config *config); int i, config_fd; char *backend = NULL; + char *shell = NULL; char *modules, *option_modules = NULL; char *log = NULL; int32_t idle_time = 300; @@ -3354,6 +3356,7 @@ int main(int argc, char *argv[]) const struct weston_option core_options[] = { { WESTON_OPTION_STRING, "backend", 'B', &backend }, + { WESTON_OPTION_STRING, "shell", 0, &shell }, { WESTON_OPTION_STRING, "socket", 'S', &socket_name }, { WESTON_OPTION_INTEGER, "idle-time", 'i', &idle_time }, { WESTON_OPTION_STRING, "modules", 0, &option_modules }, @@ -3412,8 +3415,7 @@ int main(int argc, char *argv[]) close(config_fd); section = weston_config_get_section(config, "core", NULL, NULL); - weston_config_section_get_string(section, "modules", - &modules, "desktop-shell.so"); + weston_config_section_get_string(section, "modules", &modules, ""); backend_init = load_module(backend, "backend_init"); if (!backend_init) @@ -3432,6 +3434,12 @@ int main(int argc, char *argv[]) setenv("WAYLAND_DISPLAY", socket_name, 1); + if (!shell) + weston_config_section_get_string(section, "shell", &shell, + "desktop-shell.so"); + if (load_modules(ec, shell, &argc, argv) < 0) + goto out; + if (load_modules(ec, modules, &argc, argv) < 0) goto out; if (load_modules(ec, option_modules, &argc, argv) < 0) diff --git a/weston.ini b/weston.ini index ff0f3baa..a37afe06 100644 --- a/weston.ini +++ b/weston.ini @@ -1,5 +1,6 @@ [core] -#modules=desktop-shell.so,xwayland.so,cms-colord.so +#modules=xwayland.so,cms-colord.so +#shell=desktop-shell.so [shell] background-image=/usr/share/backgrounds/gnome/Aqua.jpg