aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Daniel De Graaf <code@danieldg.net>2022-04-29 23:40:16 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2022-10-28 19:41:24 +0200
commit8f7bb145b72209724f05b0182dee33c0e47d2357 (patch)
treef2eee1187e0bdfc562130294de8dde1021e84642 /sway/input/seat.c
parentFix keymap being NULL and segfaulting on dev add (diff)
downloadsway-8f7bb145b72209724f05b0182dee33c0e47d2357.tar.gz
sway-8f7bb145b72209724f05b0182dee33c0e47d2357.tar.zst
sway-8f7bb145b72209724f05b0182dee33c0e47d2357.zip
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.
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c9
1 files changed, 0 insertions, 9 deletions
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) {
214 } 214 }
215} 215}
216 216
217void sway_force_focus(struct wlr_surface *surface) {
218 struct sway_seat *seat;
219 wl_list_for_each(seat, &server.input->seats, link) {
220 seat_keyboard_notify_enter(seat, surface);
221 seat_tablet_pads_notify_enter(seat, surface);
222 sway_input_method_relay_set_focus(&seat->im_relay, surface);
223 }
224}
225
226void seat_for_each_node(struct sway_seat *seat, 217void seat_for_each_node(struct sway_seat *seat,
227 void (*f)(struct sway_node *node, void *data), void *data) { 218 void (*f)(struct sway_node *node, void *data), void *data) {
228 struct sway_seat_node *current = NULL; 219 struct sway_seat_node *current = NULL;