diff options
-rw-r--r-- | sway/input/input-manager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 34aed115..c3507f65 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -230,11 +230,10 @@ static void handle_new_input(struct wl_listener *listener, void *data) { | |||
230 | return; | 230 | return; |
231 | } | 231 | } |
232 | 232 | ||
233 | struct seat_config *seat_config = seat_get_config(seat); | ||
234 | |||
235 | bool added = false; | 233 | bool added = false; |
236 | wl_list_for_each(seat, &input->seats, link) { | 234 | wl_list_for_each(seat, &input->seats, link) { |
237 | bool has_attachment = config && | 235 | struct seat_config *seat_config = seat_get_config(seat); |
236 | bool has_attachment = seat_config && | ||
238 | (seat_config_get_attachment(seat_config, input_device->identifier) || | 237 | (seat_config_get_attachment(seat_config, input_device->identifier) || |
239 | seat_config_get_attachment(seat_config, "*")); | 238 | seat_config_get_attachment(seat_config, "*")); |
240 | 239 | ||
@@ -246,6 +245,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) { | |||
246 | 245 | ||
247 | if (!added) { | 246 | if (!added) { |
248 | wl_list_for_each(seat, &input->seats, link) { | 247 | wl_list_for_each(seat, &input->seats, link) { |
248 | struct seat_config *seat_config = seat_get_config(seat); | ||
249 | if (seat_config && seat_config->fallback == 1) { | 249 | if (seat_config && seat_config->fallback == 1) { |
250 | seat_add_device(seat, input_device); | 250 | seat_add_device(seat, input_device); |
251 | added = true; | 251 | added = true; |