diff options
Diffstat (limited to 'sway/commands/input/xkb_switch_layout.c')
-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) { | |||
98 | struct xkb_switch_layout_action *action = | 98 | struct xkb_switch_layout_action *action = |
99 | &actions[actions_len++]; | 99 | &actions[actions_len++]; |
100 | 100 | ||
101 | action->keyboard = dev->wlr_device->keyboard; | 101 | action->keyboard = wlr_keyboard_from_input_device(dev->wlr_device); |
102 | if (relative) { | 102 | if (relative) { |
103 | action->layout = get_layout_relative( | 103 | action->layout = get_layout_relative(action->keyboard, relative); |
104 | dev->wlr_device->keyboard, relative); | ||
105 | } else { | 104 | } else { |
106 | action->layout = layout; | 105 | action->layout = layout; |
107 | } | 106 | } |