From 17a1a966c27f1cf8d2911c935480cba4527b031d Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 24 Mar 2015 15:56:15 +0200 Subject: [PATCH] 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 Reviewed-by: Jonny Lamb Reviewed-by: Nobuhiko Tanibata Reviewed-by: Bryce Harrington --- src/compositor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 7c229b69..f42fd173 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -5332,11 +5332,6 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) } } + 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);