[PATCH] Override modules list and don't always load desktop-shell.so

Pier Luigi Fiorini pierluigi.fiorini at gmail.com
Mon Apr 1 07:31:52 PDT 2013


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.
---
 src/compositor.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 1617d96..e2475c8 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3611,10 +3611,13 @@ 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)
-		goto out;
+	if (option_modules == NULL) {
+		if (load_modules(ec, modules, &argc, argv, config_file) < 0)
+			goto out;
+	} else {
+		if (load_modules(ec, option_modules, &argc, argv, config_file) < 0)
+			goto out;
+	}
 
 	free(config_file);
 
-- 
1.8.2



More information about the wayland-devel mailing list