diff options
author | Las <las@protonmail.ch> | 2018-08-10 18:19:16 +0200 |
---|---|---|
committer | Las <las@protonmail.ch> | 2018-09-18 10:14:33 +0200 |
commit | fa2e6e7d9d5ffbd782063c89e460a915b29d4a58 (patch) | |
tree | 219c3ff57b4430b7840e7b71684a5deec36bcf70 /rootston/keyboard.c | |
parent | 437f5387728703aca859f6fcec021a700472be33 (diff) |
Implement pointer-constraints protocol in wlroots and rootston
Diffstat (limited to 'rootston/keyboard.c')
-rw-r--r-- | rootston/keyboard.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rootston/keyboard.c b/rootston/keyboard.c index b5a8093b..6ba0bd6d 100644 --- a/rootston/keyboard.c +++ b/rootston/keyboard.c @@ -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); } |