aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/input-manager.c1
-rw-r--r--sway/input/seat.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 91c45dd1..68445d68 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -431,6 +431,7 @@ void input_manager_set_focus(struct sway_node *node) {
struct sway_seat *seat;
wl_list_for_each(seat, &server.input->seats, link) {
seat_set_focus(seat, node);
+ seat_consider_warp_to_focus(seat);
}
}
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 9d4dc7af..64419afa 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -948,7 +948,7 @@ struct sway_node *seat_get_focus(struct sway_seat *seat) {
if (!seat->has_focus) {
return NULL;
}
- if (wl_list_length(&seat->focus_stack) == 0) {
+ if (wl_list_empty(&seat->focus_stack)) {
return NULL;
}
struct sway_seat_node *current =