pointer and restraint update

This commit is contained in:
rozodru 2025-07-18 16:14:47 -04:00
parent 1c97f9e32b
commit da9afd10b2
2 changed files with 17 additions and 0 deletions

View File

@ -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'],
]

15
nedm.c
View File

@ -31,7 +31,9 @@
#include <wlr/types/wlr_idle_inhibit_v1.h>
#include <wlr/types/wlr_idle_notify_v1.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_pointer_constraints_v1.h>
#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_relative_pointer_v1.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_server_decoration.h>
@ -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) {