From 8f7bb145b72209724f05b0182dee33c0e47d2357 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Fri, 29 Apr 2022 23:40:16 -0400 Subject: Rework session lock keyboard focus handling When removing outputs, it is possible to end up in a situation where none of the session lock client's surfaces have keyboard focus, resulting in it not receiving keyboard events. Track the focused surface and update it as needed on surface destroy. --- sway/input/seat.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'sway/input') diff --git a/sway/input/seat.c b/sway/input/seat.c index 987e1c9f..a7408287 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -214,15 +214,6 @@ static void seat_send_focus(struct sway_node *node, struct sway_seat *seat) { } } -void sway_force_focus(struct wlr_surface *surface) { - struct sway_seat *seat; - wl_list_for_each(seat, &server.input->seats, link) { - seat_keyboard_notify_enter(seat, surface); - seat_tablet_pads_notify_enter(seat, surface); - sway_input_method_relay_set_focus(&seat->im_relay, surface); - } -} - void seat_for_each_node(struct sway_seat *seat, void (*f)(struct sway_node *node, void *data), void *data) { struct sway_seat_node *current = NULL; -- cgit v1.2.3