Register pointer_constraints interface on server display

This commit is contained in:
Chad Hyatt 2025-11-08 14:49:08 -06:00
parent f9626f7951
commit 6fcf1ce9d9
No known key found for this signature in database
GPG key ID: F174424994F4B90C
2 changed files with 9 additions and 0 deletions

8
cage.c
View file

@ -32,6 +32,7 @@
#include <wlr/types/wlr_presentation_time.h>
#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_relative_pointer_v1.h>
#include <wlr/types/wlr_pointer_constraints_v1.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_server_decoration.h>
@ -520,6 +521,13 @@ main(int argc, char *argv[])
}
wl_signal_add(&virtual_pointer->events.new_virtual_pointer, &server.new_virtual_pointer);
struct wlr_pointer_constraints_v1 *pointer_contraints = wlr_pointer_constraints_v1_create(server.wl_display);
if (!pointer_contraints) {
wlr_log(WLR_ERROR, "Unable to create the pointer constraints manager");
ret = 1;
goto end;
}
server.relative_pointer_manager = wlr_relative_pointer_manager_v1_create(server.wl_display);
if (!server.relative_pointer_manager) {
wlr_log(WLR_ERROR, "Unable to create the relative pointer manager");

View file

@ -51,6 +51,7 @@ wayland_scanner_server = generator(
server_protocols = [
[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
[wl_protocol_dir, 'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml'],
]
server_protos_headers = []