aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Las <las@protonmail.ch>2019-01-26 00:45:06 +0100
committerLibravatar emersion <contact@emersion.fr>2019-01-30 19:53:59 +0100
commitcedde21c967ae5be0d1a9c7656ab8c6b3186ae42 (patch)
tree26c784ea3d6546d762a96b131a2cf23cee9a9c38 /sway/input/seat.c
parentcriteria & scratchpad verify if show in another workspace (#3522) (diff)
downloadsway-cedde21c967ae5be0d1a9c7656ab8c6b3186ae42.tar.gz
sway-cedde21c967ae5be0d1a9c7656ab8c6b3186ae42.tar.zst
sway-cedde21c967ae5be0d1a9c7656ab8c6b3186ae42.zip
Implement pointer-constraints-unstable-v1
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 8cb1d8e9..d159da22 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -105,6 +105,11 @@ static void seat_send_focus(struct sway_node *node, struct sway_seat *seat) {
105 wlr_seat_keyboard_notify_enter( 105 wlr_seat_keyboard_notify_enter(
106 seat->wlr_seat, view->surface, NULL, 0, NULL); 106 seat->wlr_seat, view->surface, NULL, 0, NULL);
107 } 107 }
108
109 struct wlr_pointer_constraint_v1 *constraint =
110 wlr_pointer_constraints_v1_constraint_for_surface(
111 server.pointer_constraints, view->surface, seat->wlr_seat);
112 sway_cursor_constrain(seat->cursor, constraint);
108 } 113 }
109} 114}
110 115
@@ -684,6 +689,7 @@ static void send_unfocus(struct sway_container *con, void *data) {
684 689
685// Unfocus the container and any children (eg. when leaving `focus parent`) 690// Unfocus the container and any children (eg. when leaving `focus parent`)
686static void seat_send_unfocus(struct sway_node *node, struct sway_seat *seat) { 691static void seat_send_unfocus(struct sway_node *node, struct sway_seat *seat) {
692 sway_cursor_constrain(seat->cursor, NULL);
687 wlr_seat_keyboard_clear_focus(seat->wlr_seat); 693 wlr_seat_keyboard_clear_focus(seat->wlr_seat);
688 if (node->type == N_WORKSPACE) { 694 if (node->type == N_WORKSPACE) {
689 workspace_for_each_container(node->sway_workspace, send_unfocus, seat); 695 workspace_for_each_container(node->sway_workspace, send_unfocus, seat);