This commit is contained in:
Manuel Alfayate Corchete 2025-10-06 23:41:57 +00:00 committed by GitHub
commit c6b2d067e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 233 additions and 6 deletions

10
cage.c
View file

@ -29,6 +29,7 @@
#include <wlr/types/wlr_idle_notify_v1.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output_management_v1.h>
#include <wlr/types/wlr_pointer_constraints_v1.h>
#include <wlr/types/wlr_presentation_time.h>
#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_relative_pointer_v1.h>
@ -527,6 +528,15 @@ main(int argc, char *argv[])
goto end;
}
server.pointer_constraints = wlr_pointer_constraints_v1_create(server.wl_display);
if (!server.pointer_constraints) {
wlr_log(WLR_ERROR, "Unable to create the pointer constraints");
ret = 1;
goto end;
}
server.pointer_constraint.notify = handle_pointer_constraint;
wl_signal_add(&server.pointer_constraints->events.new_constraint, &server.pointer_constraint);
#if CAGE_HAS_XWAYLAND
struct wlr_xcursor_manager *xcursor_manager = NULL;
struct wlr_xwayland *xwayland = wlr_xwayland_create(server.wl_display, compositor, true);