From dbeca88dee77174a939ee4304eb3bd7e9652de73 Mon Sep 17 00:00:00 2001 From: taiyu Date: Fri, 4 Sep 2015 16:14:59 -0700 Subject: default gap value --- sway/commands.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sway/commands.c') diff --git a/sway/commands.c b/sway/commands.c index 6e74a442..cf3d5b3f 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -519,8 +519,7 @@ static bool cmd_gaps(struct sway_config *config, int argc, char **argv) { } if (argc == 1) { - char *end; - int amount = (int)strtol(argv[0], &end, 10); + int amount = (int)strtol(argv[0], NULL, 10); if (errno == ERANGE || amount == 0) { errno = 0; return false; @@ -532,8 +531,7 @@ static bool cmd_gaps(struct sway_config *config, int argc, char **argv) { config->gaps_outer = amount; } } else if (argc == 2) { - char *end; - int amount = (int)strtol(argv[1], &end, 10); + int amount = (int)strtol(argv[1], NULL, 10); if (errno == ERANGE || amount == 0) { errno = 0; return false; @@ -548,6 +546,7 @@ static bool cmd_gaps(struct sway_config *config, int argc, char **argv) { } else { return false; } + arrange_windows(&root_container, -1, -1); return true; } -- cgit v1.2.3