From d4e1791c88c496dcd4068a5729ca3416d9534b4b Mon Sep 17 00:00:00 2001 From: ARDiDo <90479315+ARDiDo@users.noreply.github.com> Date: Sun, 10 Oct 2021 12:03:18 -0400 Subject: [PATCH] Reconfigure inputs --- include/labwc.h | 1 + src/seat.c | 17 +++++++++++++++++ src/server.c | 1 + 3 files changed, 19 insertions(+) diff --git a/include/labwc.h b/include/labwc.h index 22e4e671..58244999 100644 --- a/include/labwc.h +++ b/include/labwc.h @@ -362,6 +362,7 @@ void arrange_layers(struct output *output); void seat_init(struct server *server); void seat_finish(struct server *server); +void seat_reconfigure(struct server *server); void seat_focus_surface(struct seat *seat, struct wlr_surface *surface); void seat_set_focus_layer(struct seat *seat, struct wlr_layer_surface_v1 *layer); diff --git a/src/seat.c b/src/seat.c index ba40f5d2..469ae96f 100644 --- a/src/seat.c +++ b/src/seat.c @@ -192,6 +192,23 @@ seat_finish(struct server *server) wlr_cursor_destroy(seat->cursor); } +void +seat_reconfigure(struct server *server) +{ + struct seat *seat = &server->seat; + struct input *input; + struct wlr_keyboard *kb = &seat->keyboard_group->keyboard; + wl_list_for_each(input, &seat->inputs, link) { + /* We don't configure keyboards by libinput, so skip them */ + if (wlr_input_device_is_libinput(input->wlr_input_device) && + input->wlr_input_device->type == + WLR_INPUT_DEVICE_POINTER) { + configure_libinput(input->wlr_input_device); + } + } + wlr_keyboard_set_repeat_info(kb, rc.repeat_rate, rc.repeat_delay); +} + void seat_focus_surface(struct seat *seat, struct wlr_surface *surface) { diff --git a/src/server.c b/src/server.c index b54783b1..0b944bfe 100644 --- a/src/server.c +++ b/src/server.c @@ -42,6 +42,7 @@ reload_config_and_theme(void) } menu_reconfigure(g_server, g_server->rootmenu); + seat_reconfigure(g_server); damage_all_outputs(g_server); }