Explicitly create wlr_subcompositor.

Following wlroots b6f43ab2, the subcompositor must now be created
explicitly, rather than being handled by wlr_compositor_create.
This commit is contained in:
Phil Jones 2022-01-20 11:13:10 +00:00 committed by Jente Hidskes Ankarberg
parent d3d4a129e7
commit a57e0067c1

9
cage.c
View file

@ -32,6 +32,7 @@
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_server_decoration.h>
#include <wlr/types/wlr_subcompositor.h>
#include <wlr/types/wlr_viewporter.h>
#if CAGE_HAS_XWAYLAND
#include <wlr/types/wlr_xcursor_manager.h>
@ -259,6 +260,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;
@ -356,6 +358,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");