From 278b44d1e9fb7b3227848ccd2377b150dff67ab2 Mon Sep 17 00:00:00 2001 From: Victor Makarov Date: Thu, 28 Apr 2022 13:44:17 +0300 Subject: [PATCH] add comment --- sway/commands/input/xkb_switch_layout.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/commands/input/xkb_switch_layout.c b/sway/commands/input/xkb_switch_layout.c index d385f10d8..dabc66979 100644 --- a/sway/commands/input/xkb_switch_layout.c +++ b/sway/commands/input/xkb_switch_layout.c @@ -81,6 +81,9 @@ struct cmd_results *input_cmd_xkb_switch_layout(int argc, char **argv) { return cmd_results_new(CMD_FAILURE, "Unable to allocate actions"); } + /* Calculate new indexes first because switching a layout in one + keyboard may result in a change on other keyboards as well because + of keyboard groups. */ struct sway_input_device *dev; wl_list_for_each(dev, &server.input->devices, link) { if (strcmp(ic->identifier, "*") != 0 &&