From 0972c6b2da02271c5bbfe3970fd06e2b8040aa7b Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 14 Jul 2022 13:24:18 -0500 Subject: [PATCH] compositor: Remove deprecated xwayland loading method This is awkward and long deprecated, and makes us load xwayland after all the other modules so we know if we have to load it or not. Let's remove it. We do still need to prevent loading the module the wrong way, though. Signed-off-by: Derek Foreman --- compositor/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compositor/main.c b/compositor/main.c index 280b565e..1e310c02 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -989,7 +989,7 @@ wet_get_bindir_path(const char *name) static int load_modules(struct weston_compositor *ec, const char *modules, - int *argc, char *argv[], bool *xwayland) + int *argc, char *argv[]) { const char *p, *end; char buffer[256]; @@ -1003,11 +1003,11 @@ load_modules(struct weston_compositor *ec, const char *modules, snprintf(buffer, sizeof buffer, "%.*s", (int) (end - p), p); if (strstr(buffer, "xwayland.so")) { - weston_log("Old Xwayland module loading detected: " + weston_log("fatal: Old Xwayland module loading detected: " "Please use --xwayland command line option " "or set xwayland=true in the [core] section " "in weston.ini\n"); - *xwayland = true; + return -1; } else { if (wet_load_module(ec, buffer, argc, argv) < 0) return -1; @@ -3730,10 +3730,10 @@ wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data) goto out; weston_config_section_get_string(section, "modules", &modules, ""); - if (load_modules(wet.compositor, modules, &argc, argv, &xwayland) < 0) + if (load_modules(wet.compositor, modules, &argc, argv) < 0) goto out; - if (load_modules(wet.compositor, option_modules, &argc, argv, &xwayland) < 0) + if (load_modules(wet.compositor, option_modules, &argc, argv) < 0) goto out; if (!xwayland) {