compositor: postpone unhandled option check
Move the code that checks for unhandled command line options only after
all the module loading. We pass argc, argv to all module loaders, so
modules might want to have command line options, but you cannot use them
if the check is too early.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/src/compositor.c b/src/compositor.c
index 7c229b6..f42fd17 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -5332,11 +5332,6 @@
ec->default_pointer_grab = NULL;
ec->exit_code = EXIT_SUCCESS;
- for (i = 1; i < argc; i++)
- weston_log("fatal: unhandled option: %s\n", argv[i]);
- if (argc > 1)
- goto out;
-
weston_compositor_log_capabilities(ec);
server_socket = getenv("WAYLAND_SERVER_SOCKET");
@@ -5388,6 +5383,11 @@
}
}
+ for (i = 1; i < argc; i++)
+ weston_log("fatal: unhandled option: %s\n", argv[i]);
+ if (argc > 1)
+ goto out;
+
weston_compositor_wake(ec);
wl_display_run(display);