xdg_shell: add support for wlr-foreign-toplevel-management

This commit is contained in:
GnSight 2025-10-01 11:53:09 +08:00
parent 2e593fe5a8
commit b35d0afae4
6 changed files with 129 additions and 9 deletions

8
cage.c
View file

@ -24,6 +24,7 @@
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_idle_inhibit_v1.h>
#include <wlr/types/wlr_idle_notify_v1.h>
@ -527,6 +528,13 @@ main(int argc, char *argv[])
goto end;
}
server.foreign_toplevel_manager = wlr_foreign_toplevel_manager_v1_create(server.wl_display);
if (!server.foreign_toplevel_manager) {
wlr_log(WLR_ERROR, "Unable to create the foreign toplevel manager");
ret = 1;
goto end;
}
#if CAGE_HAS_XWAYLAND
struct wlr_xcursor_manager *xcursor_manager = NULL;
struct wlr_xwayland *xwayland = wlr_xwayland_create(server.wl_display, compositor, true);