From c1b95f270030218b82e77c5daa67d96007986631 Mon Sep 17 00:00:00 2001 From: ArenM Date: Tue, 5 Jul 2022 11:40:58 -0400 Subject: [PATCH] reset layer index on rotation If there are more layers in one orientation than the other this can cause wvkbd to overshoot the end of the layer list when switching layers. It also means that switching layers after rotating will jump to the next layer in the list, which is somewhat unexpected. Signed-off-by: Maarten van Gompel --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index dffd31f..c3c1288 100644 --- a/main.c +++ b/main.c @@ -273,6 +273,7 @@ display_handle_geometry(void *data, struct wl_output *wl_output, int x, int y, keyboard.layout = &keyboard.layouts[layer]; keyboard.prevlayout = keyboard.layout; + keyboard.layer_index = 0; if (layer_surface) { zwlr_layer_surface_v1_set_size(layer_surface, 0, height);