[PATCH] Add a --shell option to override the default desktop-shell

Jason Ekstrand jason at jlekstrand.net
Thu Aug 22 15:27:22 PDT 2013


Sorry, I had a vim blooper in this one.  New patch coming.
--Jason Ekstrand


On Thu, Aug 22, 2013 at 5:24 PM, Jason Ekstrand <jason at jlekstrand.net>wrote:

> Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> ---
>  src/compositor.c | 14 +++++++++++---
>  weston.ini       |  3 ++-
>  2 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index e9ba0fd..7454050 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -3224,7 +3224,8 @@ 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"
> -               "  -S, --socket=NAME\tName of socket to listen on\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"
>                 "  --log==FILE\t\tLog to the given file\n"
> @@ -3311,6 +3312,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;
> @@ -3322,6 +3324,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 },
> @@ -3380,8 +3383,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)
> @@ -3400,6 +3402,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 f2abceb..60d10f6 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
> --
> 1.8.3.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130822/85434fbe/attachment-0001.html>


More information about the wayland-devel mailing list