sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit bb708d0f82d6e418ada6b0b5798455c8213e5412
parent 415a48ac6387a62a59adb8ed1168e851509a0ce3
Author: Ryan Dwyer <ryandwyer1@gmail.com>
Date:   Sat, 29 Sep 2018 12:58:54 +1000

Don't allow negative gaps

Diffstat:
Msway/commands/gaps.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/sway/commands/gaps.c b/sway/commands/gaps.c @@ -68,6 +68,9 @@ static struct cmd_results *gaps_set_defaults(int argc, char **argv) { return cmd_results_new(CMD_INVALID, "gaps", "Expected 'gaps inner|outer <px>'"); } + if (amount < 0) { + amount = 0; + } if (inner) { config->gaps_inner = amount; @@ -92,6 +95,9 @@ static void configure_gaps(struct sway_workspace *ws, void *_data) { *prop -= data->amount; break; } + if (*prop < 0) { + *prop = 0; + } arrange_workspace(ws); }