]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Reconfigure inputs
authorARDiDo <90479315+ARDiDo@users.noreply.github.com>
Sun, 10 Oct 2021 16:03:18 +0000 (12:03 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 10 Oct 2021 20:52:40 +0000 (21:52 +0100)
include/labwc.h
src/seat.c
src/server.c

index 22e4e6719630fa61fcc3fc55803f5e42c20d0f1a..58244999b370cab1fd60d14d5709aeb3d42ea46c 100644 (file)
@@ -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);
 
index ba40f5d24a7ba7aa5cfef22681e7a13255ce2897..469ae96f9c61c176fcf27e0db4d3922996568933 100644 (file)
@@ -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)
 {
index b54783b190626a28ec1c12d048cf9461126f4b03..0b944bfe68d17d2f2b9120390af55bf82d34d65f 100644 (file)
@@ -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);
 }