aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-09 23:41:00 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-09 23:41:00 +1000
commitb0fc7e98501fc885197de90af6579dc121e7ef46 (patch)
tree3021699cc8742542ca1f0e7f408d53d0b3efe8e8
parentImplement some floating move commands (diff)
downloadsway-b0fc7e98501fc885197de90af6579dc121e7ef46.tar.gz
sway-b0fc7e98501fc885197de90af6579dc121e7ef46.tar.zst
sway-b0fc7e98501fc885197de90af6579dc121e7ef46.zip
Remove duplicate function declaration and add assertion
-rw-r--r--include/sway/output.h2
-rw-r--r--sway/tree/container.c4
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,
97 struct sway_output *output, struct root_geometry *geo, 97 struct sway_output *output, struct root_geometry *geo,
98 wlr_surface_iterator_func_t iterator, void *user_data); 98 wlr_surface_iterator_func_t iterator, void *user_data);
99 99
100struct sway_container *output_get_active_workspace(struct sway_output *output);
101
102#endif 100#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(
1052 1052
1053void container_floating_move_to(struct sway_container *con, 1053void container_floating_move_to(struct sway_container *con,
1054 double lx, double ly) { 1054 double lx, double ly) {
1055 if (!sway_assert(container_is_floating(con),
1056 "Expected a floating container")) {
1057 return;
1058 }
1055 desktop_damage_whole_container(con); 1059 desktop_damage_whole_container(con);
1056 container_floating_translate(con, lx - con->x, ly - con->y); 1060 container_floating_translate(con, lx - con->x, ly - con->y);
1057 desktop_damage_whole_container(con); 1061 desktop_damage_whole_container(con);