diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 6 |
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`) |
686 | static void seat_send_unfocus(struct sway_node *node, struct sway_seat *seat) { | 691 | static 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); |