aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/input/xkb_switch_layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/input/xkb_switch_layout.c')
-rw-r--r--sway/commands/input/xkb_switch_layout.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sway/commands/input/xkb_switch_layout.c b/sway/commands/input/xkb_switch_layout.c
index dabc6697..ecac8e6c 100644
--- a/sway/commands/input/xkb_switch_layout.c
+++ b/sway/commands/input/xkb_switch_layout.c
@@ -1,4 +1,3 @@
1#define _POSIX_C_SOURCE 200809L
2#include <assert.h> 1#include <assert.h>
3#include <wlr/interfaces/wlr_keyboard.h> 2#include <wlr/interfaces/wlr_keyboard.h>
4#include "sway/config.h" 3#include "sway/config.h"
@@ -98,10 +97,9 @@ struct cmd_results *input_cmd_xkb_switch_layout(int argc, char **argv) {
98 struct xkb_switch_layout_action *action = 97 struct xkb_switch_layout_action *action =
99 &actions[actions_len++]; 98 &actions[actions_len++];
100 99
101 action->keyboard = dev->wlr_device->keyboard; 100 action->keyboard = wlr_keyboard_from_input_device(dev->wlr_device);
102 if (relative) { 101 if (relative) {
103 action->layout = get_layout_relative( 102 action->layout = get_layout_relative(action->keyboard, relative);
104 dev->wlr_device->keyboard, relative);
105 } else { 103 } else {
106 action->layout = layout; 104 action->layout = layout;
107 } 105 }