[PATCH] Override modules list and don't always load desktop-shell.so
Kristian Høgsberg
hoegsberg at gmail.com
Mon Apr 15 18:50:27 PDT 2013
On Sun, Apr 14, 2013 at 07:17:40PM +0200, Pier Luigi Fiorini wrote:
> Let --modules override modules list and load desktop-shell.so as a
> fallback if a modules list is not specified neither by passing
> --modules nor with weston.ini.
>
> Signed-off-by: Pier Luigi Fiorini <pierluigi.fiorini at gmail.com>
> ---
> man/weston.man | 5 +++--
> src/compositor.c | 7 +++----
> 2 files changed, 6 insertions(+), 6 deletions(-)
I know the current behavior is a bit problematic for some use cases.
However it works well for the case where you load a plugin in addition
to the shell, like xwayland. I'm not sure what the best way to make
both cases work is, except to make the shell plugin special. We could
go back to use a shell config key and command line option and make
modules only about additional modules.
Kristian
> diff --git a/man/weston.man b/man/weston.man
> index 39d854b..75ce637 100644
> --- a/man/weston.man
> +++ b/man/weston.man
> @@ -125,8 +125,9 @@ Append log messages to the file
> instead of writing them to stderr.
> .TP
> \fB\-\-modules\fR=\fImodule1.so,module2.so\fR
> -Load the comma-separated list of modules. Only used by the test
> -suite. The file is searched for in
> +Load the comma-separated list of modules, overriding any module listed
> +in weston.ini.
> +The file is searched for in
> .IR "__weston_modules_dir__" ,
> or you can pass an absolute path.
> .TP
> diff --git a/src/compositor.c b/src/compositor.c
> index 693df2c..2ee9d68 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -3466,7 +3466,8 @@ usage(int error_code)
> "\t\t\t\twayland-backend.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"
> + " --modules\t\tLoad the comma-separated list of modules overriding\n"
> + "\t\t\tany module listed in weston.ini\n"
> " --log==FILE\t\tLog to the given file\n"
> " -h, --help\t\tThis help message\n\n");
>
> @@ -3617,9 +3618,7 @@ int main(int argc, char *argv[])
>
> setenv("WAYLAND_DISPLAY", socket_name, 1);
>
> - if (load_modules(ec, modules, &argc, argv, config_file) < 0)
> - goto out;
> - if (load_modules(ec, option_modules, &argc, argv, config_file) < 0)
> + if (load_modules(ec, option_modules ? option_modules : modules, &argc, argv, config_file) < 0)
> goto out;
>
> free(config_file);
> --
> 1.8.2.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list