From 9dea5920285a07b2acb186eaae575237f7859784 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Thu, 20 Jan 2022 11:13:10 +0000 Subject: [PATCH] Explicitly create wlr_subcompositor. Following wlroots b6f43ab2, the subcompositor must now be created explicitly, rather than being handled by wlr_compositor_create. --- cage.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cage.c b/cage.c index 95f0cc7..6f23431 100644 --- a/cage.c +++ b/cage.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #if CAGE_HAS_XWAYLAND #include @@ -254,6 +255,7 @@ main(int argc, char *argv[]) struct wl_event_source *sigterm_source = NULL; struct wl_event_source *sigchld_source = NULL; struct wlr_compositor *compositor = NULL; + struct wlr_subcompositor *subcompositor = NULL; struct wlr_data_device_manager *data_device_manager = NULL; struct wlr_server_decoration_manager *server_decoration_manager = NULL; struct wlr_xdg_decoration_manager_v1 *xdg_decoration_manager = NULL; @@ -351,6 +353,13 @@ main(int argc, char *argv[]) goto end; } + subcompositor = wlr_subcompositor_create(server.wl_display); + if (!subcompositor) { + wlr_log(WLR_ERROR, "Unable to create the wlroots subcompositor"); + ret = 1; + goto end; + } + data_device_manager = wlr_data_device_manager_create(server.wl_display); if (!data_device_manager) { wlr_log(WLR_ERROR, "Unable to create the data device manager");