aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorKonstantin Pospelov <kupospelov@gmail.com>2018-11-25 15:16:45 +0300
committerKonstantin Pospelov <kupospelov@gmail.com>2018-11-25 15:16:45 +0300
commitf9bde0030dd12d1afd8dd6378f099944727561cf (patch)
treea77609c2170379af08df3de0a35b506f653ed58a /sway/commands
parenta7b9e63cbcacc5dd4629598734a231b9f830670d (diff)
downloadsway-f9bde0030dd12d1afd8dd6378f099944727561cf.tar.xz
resize set: add assertion for an invalid unit
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/resize.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/resize.c b/sway/commands/resize.c
index bafaea87..cf5dea02 100644
--- a/sway/commands/resize.c
+++ b/sway/commands/resize.c
@@ -524,7 +524,9 @@ static struct cmd_results *resize_set_floating(struct sway_container *con,
grow_width = width->amount - con->width;
con->x -= grow_width / 2;
con->width = width->amount;
+ break;
case RESIZE_UNIT_INVALID:
+ sway_assert(false, "invalid width unit");
break;
}
}
@@ -542,7 +544,9 @@ static struct cmd_results *resize_set_floating(struct sway_container *con,
grow_height = height->amount - con->height;
con->y -= grow_height / 2;
con->height = height->amount;
+ break;
case RESIZE_UNIT_INVALID:
+ sway_assert(false, "invalid height unit");
break;
}
}