aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-07-09 23:41:00 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-07-09 23:41:00 +1000
commitb0fc7e98501fc885197de90af6579dc121e7ef46 (patch)
tree3021699cc8742542ca1f0e7f408d53d0b3efe8e8 /sway/tree
parentab8a86369c01c7146991ff4ae2ef04b0a1db06ca (diff)
downloadsway-b0fc7e98501fc885197de90af6579dc121e7ef46.tar.xz
Remove duplicate function declaration and add assertion
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/container.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 2df2332c..92408ce6 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -1052,6 +1052,10 @@ static struct sway_container *container_floating_find_output(
void container_floating_move_to(struct sway_container *con,
double lx, double ly) {
+ if (!sway_assert(container_is_floating(con),
+ "Expected a floating container")) {
+ return;
+ }
desktop_damage_whole_container(con);
container_floating_translate(con, lx - con->x, ly - con->y);
desktop_damage_whole_container(con);