diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-06 14:29:26 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-06 14:29:26 +1000 |
commit | 1f941163d3a74b03d2fbbb3376f89f11664c36ba (patch) | |
tree | 7b87fed5ffedf5087230777a0498491477aada72 /sway/commands/layout.c | |
parent | Merge pull request #2586 from RyanDwyer/fix-fullscreen-focus-crash (diff) | |
download | sway-1f941163d3a74b03d2fbbb3376f89f11664c36ba.tar.gz sway-1f941163d3a74b03d2fbbb3376f89f11664c36ba.tar.zst sway-1f941163d3a74b03d2fbbb3376f89f11664c36ba.zip |
Fix crash when running "layout toggle"
The argc and argv used in this function are the same ones used by the
layout command itself.
Diffstat (limited to 'sway/commands/layout.c')
-rw-r--r-- | sway/commands/layout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c index 44ce2970..ef3ec1cb 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c | |||
@@ -29,7 +29,7 @@ static enum sway_container_layout get_layout_toggle(int argc, char **argv, | |||
29 | enum sway_container_layout layout, | 29 | enum sway_container_layout layout, |
30 | enum sway_container_layout prev_split_layout) { | 30 | enum sway_container_layout prev_split_layout) { |
31 | // "layout toggle" | 31 | // "layout toggle" |
32 | if (argc == 0) { | 32 | if (argc == 1) { |
33 | return layout == L_HORIZ ? L_VERT : L_HORIZ; | 33 | return layout == L_HORIZ ? L_VERT : L_HORIZ; |
34 | } | 34 | } |
35 | 35 | ||