aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-09-04 19:26:15 -0400
committerDrew DeVault <sir@cmpwn.com>2015-09-04 19:26:15 -0400
commita693f671070a96f9a17c61aed6d1f95dd7b957de (patch)
tree3d94a9d84651b52423ccff22de81f3fec6e823ee /sway/commands.c
parentccf43329a86921d58be6428e494bb6b3fc0af29e (diff)
parentdbeca88dee77174a939ee4304eb3bd7e9652de73 (diff)
Merge pull request #168 from taiyu-len/master
default gap value.
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c7
1 files changed, 3 insertions, 4 deletions
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;
}