From baeb28ea6230ef9aa409ee52abe208720120e45c Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sun, 23 Sep 2018 19:56:52 -0400 Subject: Implement support for input wildcard --- sway/commands/input/xkb_options.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'sway/commands/input/xkb_options.c') diff --git a/sway/commands/input/xkb_options.c b/sway/commands/input/xkb_options.c index 3059d941..794ab6e9 100644 --- a/sway/commands/input/xkb_options.c +++ b/sway/commands/input/xkb_options.c @@ -9,18 +9,15 @@ struct cmd_results *input_cmd_xkb_options(int argc, char **argv) { if ((error = checkarg(argc, "xkb_options", EXPECTED_EQUAL_TO, 1))) { return error; } - struct input_config *current_input_config = - config->handler_context.input_config; - if (!current_input_config) { - return cmd_results_new(CMD_FAILURE, "xkb_options", "No input device defined."); + struct input_config *ic = config->handler_context.input_config; + if (!ic) { + return cmd_results_new(CMD_FAILURE, "xkb_options", + "No input device defined."); } - struct input_config *new_config = - new_input_config(current_input_config->identifier); - new_config->xkb_options = strdup(argv[0]); + ic->xkb_options = strdup(argv[0]); - wlr_log(WLR_DEBUG, "apply-xkb_options for device: %s options: %s", - current_input_config->identifier, new_config->xkb_options); - apply_input_config(new_config); + wlr_log(WLR_DEBUG, "set-xkb_options for config: %s options: %s", + ic->identifier, ic->xkb_options); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } -- cgit v1.2.3-54-g00ecf