diff options
-rw-r--r-- | include/sway/tree/container.h | 2 | ||||
-rw-r--r-- | sway/tree/container.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 7e78cbef..728daa84 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -295,6 +295,6 @@ bool container_is_floating(struct sway_container *container); /** * Get a container's box in layout coordinates. */ -struct wlr_box *container_get_box(struct sway_container *container); +void container_get_box(struct sway_container *container, struct wlr_box *box); #endif diff --git a/sway/tree/container.c b/sway/tree/container.c index 8446c457..ab3d9dbd 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -988,11 +988,9 @@ bool container_is_floating(struct sway_container *container) { return container->parent == workspace->sway_workspace->floating; } -struct wlr_box *container_get_box(struct sway_container *container) { - struct wlr_box *box = calloc(1, sizeof(struct wlr_box)); +void container_get_box(struct sway_container *container, struct wlr_box *box) { box->x = container->x; box->y = container->y; box->width = container->width; box->height = container->height; - return box; } |