aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/input/seat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 82e0e754..1a4ccd77 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -357,6 +357,14 @@ struct sway_seat *seat_create(const char *seat_name) {
root_for_each_workspace(collect_focus_workspace_iter, seat);
root_for_each_container(collect_focus_container_iter, seat);
+ if (!wl_list_empty(&server.input->seats)) {
+ // Since this is not the first seat, attempt to set initial focus
+ struct sway_seat *current_seat = input_manager_current_seat();
+ struct sway_node *current_focus =
+ seat_get_focus_inactive(current_seat, &root->node);
+ seat_set_focus(seat, current_focus);
+ }
+
wl_signal_add(&root->events.new_node, &seat->new_node);
seat->new_node.notify = handle_new_node;