diff --git a/meson.build b/meson.build index ec0bf7b..2a4c80f 100644 --- a/meson.build +++ b/meson.build @@ -78,6 +78,8 @@ 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'], + [wl_protocol_dir, 'unstable/relative-pointer/relative-pointer-unstable-v1.xml'], ['protocols', 'wlr-layer-shell-unstable-v1.xml'], ] diff --git a/nedm.c b/nedm.c index ba8c9c4..8466bda 100644 --- a/nedm.c +++ b/nedm.c @@ -31,7 +31,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -655,6 +657,19 @@ main(int argc, char *argv[]) { // Initialize layer shell nedm_layer_shell_init(&server); + // Initialize pointer constraints and relative pointer protocols + if(!wlr_pointer_constraints_v1_create(server.wl_display)) { + wlr_log(WLR_ERROR, "Unable to create pointer constraints manager"); + ret = 1; + goto end; + } + + if(!wlr_relative_pointer_manager_v1_create(server.wl_display)) { + wlr_log(WLR_ERROR, "Unable to create relative pointer manager"); + ret = 1; + goto end; + } + #if NEDM_HAS_XWAYLAND server.xwayland = wlr_xwayland_create(server.wl_display, compositor, true); if(!server.xwayland) {