apply labwc/labwc#85 to add support for pointer constraints

This commit is contained in:
Dima Krasner 2021-12-22 08:31:14 +02:00
parent 3321daef98
commit 4e9b9273f1
5 changed files with 121 additions and 3 deletions

8
cage.c
View file

@ -36,6 +36,8 @@
#if CAGE_HAS_XWAYLAND
#include <wlr/types/wlr_xcursor_manager.h>
#endif
#include <wlr/types/wlr_pointer_constraints_v1.h>
#include <wlr/types/wlr_relative_pointer_v1.h>
#include <wlr/types/wlr_xdg_decoration_v1.h>
#include <wlr/types/wlr_xdg_output_v1.h>
#include <wlr/types/wlr_xdg_shell.h>
@ -459,6 +461,12 @@ main(int argc, char *argv[])
goto end;
}
server.relative_pointer_manager = wlr_relative_pointer_manager_v1_create(server.wl_display);
server.constraints = wlr_pointer_constraints_v1_create(server.wl_display);
server.new_constraint.notify = seat_create_constraint;
wl_signal_add(&server.constraints->events.new_constraint, &server.new_constraint);
#if CAGE_HAS_XWAYLAND
xwayland = wlr_xwayland_create(server.wl_display, compositor, true);
if (!xwayland) {