mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-01-01 11:08:21 -05:00
Implement pointer-constraints protocol in wlroots and rootston
This commit is contained in:
parent
437f538772
commit
fa2e6e7d9d
23 changed files with 1134 additions and 20 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <wlr/backend/multi.h>
|
||||
#include <wlr/backend/session.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_pointer_constraints_v1.h>
|
||||
#include <wlr/types/wlr_pointer.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
|
@ -176,6 +177,13 @@ static void keyboard_binding_execute(struct roots_keyboard *keyboard,
|
|||
decoration->wlr_decoration, mode);
|
||||
}
|
||||
}
|
||||
} else if (strcmp(command, "break_pointer_constraint") == 0) {
|
||||
struct wl_list *list =
|
||||
&keyboard->input->seats;
|
||||
struct roots_seat *seat;
|
||||
wl_list_for_each(seat, list, link) {
|
||||
roots_cursor_constrain(seat->cursor, NULL, NAN, NAN);
|
||||
}
|
||||
} else {
|
||||
wlr_log(WLR_ERROR, "unknown binding command: %s", command);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue