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>
This commit is contained in:
Pekka Paalanen 2015-03-24 15:56:15 +02:00
parent a5855adace
commit 17a1a966c2

View File

@ -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);