Make the default desktop shell client configurable
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Mon, 2 Dec 2013 11:53:32 +0000 (12:53 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 2 Dec 2013 23:44:49 +0000 (15:44 -0800)
The default can be set by passing WESTON_SHELL_CLIENT as an argument
to configure, similarly to WESTON_NATIVE_BACKEND.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
configure.ac
man/Makefile.am
man/weston.ini.man
src/shell.c

index a460d3b..bd8ff44 100644 (file)
@@ -35,6 +35,8 @@ LT_INIT([disable-static])
 
 AC_ARG_VAR([WESTON_NATIVE_BACKEND],
            [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@])
+AC_ARG_VAR([WESTON_SHELL_CLIENT],
+           [Set the default desktop shell client to load if none is specified in weston.ini. @<:@default=weston-desktop-shell@:>@])
 
 PKG_PROG_PKG_CONFIG()
 
@@ -456,6 +458,13 @@ AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
 AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
                   [The default backend to load, if not wayland nor x11.])
 
+if test "x$WESTON_SHELL_CLIENT" = "x"; then
+       WESTON_SHELL_CLIENT="weston-desktop-shell"
+fi
+AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT])
+AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"],
+                  [The default desktop shell client to load.])
+
 AC_ARG_ENABLE(demo-clients,
               AS_HELP_STRING([--enable-demo-clients],
                              [install demo clients built with weston]),,
index e4abd8c..5fb030a 100644 (file)
@@ -7,6 +7,7 @@ endif
 MAN_SUBSTS = \
        -e 's|__weston_native_backend__|$(WESTON_NATIVE_BACKEND)|g' \
        -e 's|__weston_modules_dir__|$(pkglibdir)|g' \
+       -e 's|__weston_shell_client__|$(WESTON_SHELL_CLIENT)|g' \
        -e 's|__version__|$(PACKAGE_VERSION)|g'
 
 SUFFIXES = .1 .5 .7 .man
index cc88ca8..6be90bf 100644 (file)
@@ -141,7 +141,8 @@ The entries that can appear in this section are:
 .TP 7
 .BI "client=" file
 sets the path for the shell client to run. If not specified
-weston-desktop-shell is launched (string).
+.I __weston_shell_client__
+is launched (string).
 .TP 7
 .BI "background-image=" file
 sets the path for the background image file (string).
index 00e0f1c..ada60e8 100644 (file)
@@ -587,7 +587,7 @@ shell_configuration(struct desktop_shell *shell)
        section = weston_config_get_section(shell->compositor->config,
                                            "shell", NULL, NULL);
        weston_config_section_get_string(section,
-                                        "client", &s, LIBEXECDIR "/weston-desktop-shell");
+                                        "client", &s, LIBEXECDIR "/" WESTON_SHELL_CLIENT);
        shell->client = s;
        weston_config_section_get_string(section,
                                         "binding-modifier", &s, "super");