diff --git a/compositor/cms-colord.c b/compositor/cms-colord.c index 152a7347..ae3ef25e 100644 --- a/compositor/cms-colord.c +++ b/compositor/cms-colord.c @@ -34,6 +34,7 @@ #include #include "compositor.h" +#include "weston.h" #include "cms-helper.h" #include "shared/helpers.h" diff --git a/compositor/systemd-notify.c b/compositor/systemd-notify.c index 49e51f40..ce18ede9 100644 --- a/compositor/systemd-notify.c +++ b/compositor/systemd-notify.c @@ -34,6 +34,7 @@ #include "shared/string-helpers.h" #include "shared/zalloc.h" #include "compositor.h" +#include "weston.h" struct systemd_notifier { int watchdog_time; diff --git a/compositor/weston.h b/compositor/weston.h index bb040020..2e0417c6 100644 --- a/compositor/weston.h +++ b/compositor/weston.h @@ -63,6 +63,10 @@ wet_get_config(struct weston_compositor *compositor); void * wet_load_module(const char *name, const char *entrypoint); +int +module_init(struct weston_compositor *compositor, + int *argc, char *argv[]); + int wet_load_xwayland(struct weston_compositor *comp); diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c index daf024e5..af774747 100644 --- a/fullscreen-shell/fullscreen-shell.c +++ b/fullscreen-shell/fullscreen-shell.c @@ -34,6 +34,7 @@ #include #include "compositor.h" +#include "compositor/weston.h" #include "fullscreen-shell-unstable-v1-server-protocol.h" #include "shared/helpers.h" diff --git a/libweston/compositor.c b/libweston/compositor.c index 2660264e..5e232778 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -5409,14 +5409,12 @@ weston_compositor_load_backend(struct weston_compositor *compositor, WL_EXPORT int weston_compositor_load_xwayland(struct weston_compositor *compositor) { - int (*module_init)(struct weston_compositor *ec, - int *argc, char *argv[]); - int argc = 0; + int (*module_init)(struct weston_compositor *ec); - module_init = weston_load_module("xwayland.so", "module_init"); + module_init = weston_load_module("xwayland.so", "weston_module_init"); if (!module_init) return -1; - if (module_init(compositor, &argc, NULL) < 0) + if (module_init(compositor) < 0) return -1; return 0; } diff --git a/libweston/compositor.h b/libweston/compositor.h index 1e57b3ff..b049c980 100644 --- a/libweston/compositor.h +++ b/libweston/compositor.h @@ -1818,8 +1818,7 @@ int weston_backend_init(struct weston_compositor *c, struct weston_backend_config *config_base); int -module_init(struct weston_compositor *compositor, - int *argc, char *argv[]); +weston_module_init(struct weston_compositor *compositor); void weston_transformed_coord(int width, int height, diff --git a/tests/plugin-registry-test.c b/tests/plugin-registry-test.c index 7fc88f39..2a32e01e 100644 --- a/tests/plugin-registry-test.c +++ b/tests/plugin-registry-test.c @@ -28,6 +28,7 @@ #include #include "compositor.h" +#include "compositor/weston.h" #include "plugin-registry.h" static void diff --git a/tests/surface-global-test.c b/tests/surface-global-test.c index 55899c67..20d99ce9 100644 --- a/tests/surface-global-test.c +++ b/tests/surface-global-test.c @@ -29,6 +29,7 @@ #include #include "compositor.h" +#include "compositor/weston.h" static void surface_to_from_global(void *data) diff --git a/tests/surface-screenshot.c b/tests/surface-screenshot.c index 332b5e39..6ff2bfc5 100644 --- a/tests/surface-screenshot.c +++ b/tests/surface-screenshot.c @@ -34,6 +34,7 @@ #include #include "compositor.h" +#include "compositor/weston.h" #include "file-util.h" static char * diff --git a/tests/surface-test.c b/tests/surface-test.c index 243f8dc3..44630610 100644 --- a/tests/surface-test.c +++ b/tests/surface-test.c @@ -29,6 +29,7 @@ #include #include "compositor.h" +#include "compositor/weston.h" static void surface_transform(void *data) diff --git a/xwayland/launcher.c b/xwayland/launcher.c index 276795af..0ecdb205 100644 --- a/xwayland/launcher.c +++ b/xwayland/launcher.c @@ -351,8 +351,7 @@ const struct weston_xwayland_api api = { extern const struct weston_xwayland_surface_api surface_api; WL_EXPORT int -module_init(struct weston_compositor *compositor, - int *argc, char *argv[]) +weston_module_init(struct weston_compositor *compositor) { struct wl_display *display = compositor->wl_display;