aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/commands.h
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-06-19 18:21:18 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2019-06-20 10:13:58 +0300
commitc346c020bf93d455dab917dd27d86afc78273dd2 (patch)
treed041867620d3f08299ca3707f05dcc084e39202f /include/sway/commands.h
parentconfig/xwayland: retain xwayland status on reload (diff)
downloadsway-c346c020bf93d455dab917dd27d86afc78273dd2.tar.gz
sway-c346c020bf93d455dab917dd27d86afc78273dd2.tar.zst
sway-c346c020bf93d455dab917dd27d86afc78273dd2.zip
config: fix find_handler logic
Without this change, the handlers listed in the config_handlers or command_handlers arrays (depending on reading or active) in commands.c would be valid subcommands. To make matters worse, they would also take precedence over the defined subcommand handlers. This corrects find_handler to only work on the handler array given instead of implicitly trying others.
Diffstat (limited to 'include/sway/commands.h')
-rw-r--r--include/sway/commands.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index e0cd94d1..641f2504 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -47,7 +47,8 @@ struct cmd_results *checkarg(int argc, const char *name,
47 enum expected_args type, int val); 47 enum expected_args type, int val);
48 48
49struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers, 49struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers,
50 int handlers_size); 50 size_t handlers_size);
51
51/** 52/**
52 * Parse and executes a command. 53 * Parse and executes a command.
53 * 54 *