summaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authortaiyu <[email protected]>2015-09-04 17:09:07 -0700
committertaiyu <[email protected]>2015-09-04 17:09:07 -0700
commitafa6747145fe0ddc284ae115df937cd18ad4f3ff (patch)
treed3aa3d1e873832475e399528161d2e362733dbf4 /sway/config.c
parentc5d0b5d4372a9443e07386b9dc47bd1681bbf699 (diff)
enum for command type
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c
index cbaab11e..90f6529a 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -220,9 +220,9 @@ bool read_config(FILE *file, bool is_active) {
list_t *args = split_string(line, " ");
struct cmd_handler *handler;
if ((handler = find_handler(args->items[0]))) {
- if (handler->config_type > 0) {
+ if (handler->config_type == CMD_KEYBIND) {
sway_log(L_ERROR, "Invalid command during config ``%s''", line);
- } else if (handler->config_type < 0 && !is_active) {
+ } else if (handler->config_type == CMD_COMPOSITOR_READY && !is_active) {
sway_log(L_DEBUG, "Deferring command ``%s''", line);
char *cmd = malloc(strlen(line) + 1);
strcpy(cmd, line);