diff options
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/input/xkb_switch_layout.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sway/commands/input/xkb_switch_layout.c b/sway/commands/input/xkb_switch_layout.c index dabc6697..3cce4ec8 100644 --- a/sway/commands/input/xkb_switch_layout.c +++ b/sway/commands/input/xkb_switch_layout.c @@ -98,10 +98,9 @@ struct cmd_results *input_cmd_xkb_switch_layout(int argc, char **argv) { struct xkb_switch_layout_action *action = &actions[actions_len++]; - action->keyboard = dev->wlr_device->keyboard; + action->keyboard = wlr_keyboard_from_input_device(dev->wlr_device); if (relative) { - action->layout = get_layout_relative( - dev->wlr_device->keyboard, relative); + action->layout = get_layout_relative(action->keyboard, relative); } else { action->layout = layout; } |