mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01:00
fixes to cmd queue freeing, style
This commit is contained in:
parent
9a0a858d1e
commit
527288a826
3 changed files with 3 additions and 4 deletions
|
@ -229,8 +229,7 @@ static bool cmd_set(struct sway_config *config, int argc, char **argv) {
|
||||||
|
|
||||||
static bool _do_split(struct sway_config *config, int argc, char **argv, int layout) {
|
static bool _do_split(struct sway_config *config, int argc, char **argv, int layout) {
|
||||||
char *name = layout == L_VERT ? "splitv":
|
char *name = layout == L_VERT ? "splitv":
|
||||||
layout == L_HORIZ ? "splith":
|
layout == L_HORIZ ? "splith":"split";
|
||||||
"split";
|
|
||||||
if (!checkarg(argc, name, EXPECTED_EQUAL_TO, 0)) {
|
if (!checkarg(argc, name, EXPECTED_EQUAL_TO, 0)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct sway_config *read_config(FILE *file, bool is_active) {
|
||||||
char *cmd = malloc(strlen(line) + 1);
|
char *cmd = malloc(strlen(line) + 1);
|
||||||
strcpy(cmd, line);
|
strcpy(cmd, line);
|
||||||
list_add(config->cmd_queue, cmd);
|
list_add(config->cmd_queue, cmd);
|
||||||
}else if (!temp_depth && !handle_command(config, line)) {
|
} else if (!temp_depth && !handle_command(config, line)) {
|
||||||
sway_log(L_DEBUG, "Config load failed for line %s", line);
|
sway_log(L_DEBUG, "Config load failed for line %s", line);
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ static void handle_wlc_ready(void) {
|
||||||
for (i = 0; i < config->cmd_queue->length; ++i) {
|
for (i = 0; i < config->cmd_queue->length; ++i) {
|
||||||
handle_command(config, config->cmd_queue->items[i]);
|
handle_command(config, config->cmd_queue->items[i]);
|
||||||
}
|
}
|
||||||
list_free(config->cmd_queue);
|
free_flat_list(config->cmd_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue