From b0fc7e98501fc885197de90af6579dc121e7ef46 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 9 Jul 2018 23:41:00 +1000 Subject: [PATCH] Remove duplicate function declaration and add assertion --- include/sway/output.h | 2 -- sway/tree/container.c | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/sway/output.h b/include/sway/output.h index bd25e76e..b6cda83c 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -97,6 +97,4 @@ void output_drag_icons_for_each_surface(struct wl_list *drag_icons, struct sway_output *output, struct root_geometry *geo, wlr_surface_iterator_func_t iterator, void *user_data); -struct sway_container *output_get_active_workspace(struct sway_output *output); - #endif 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);