From ff677c9255a16e3ed60e5b6133eda1f825c25dc7 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Tue, 23 Jul 2024 16:33:49 +1000 Subject: [PATCH] resize by dragging gaps --- sway/tree/container.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sway/tree/container.c b/sway/tree/container.c index 9b90b774..4977fc16 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -350,11 +350,12 @@ static struct sway_container *view_container_at(struct sway_node *parent, } struct sway_container *container = parent->sway_container; + int gaps = container->current.workspace->gaps_inner; struct wlr_box box = { - .x = container->pending.x, - .y = container->pending.y, - .width = container->pending.width, - .height = container->pending.height, + .x = container->pending.x - (gaps / 2), + .y = container->pending.y - (gaps / 2), + .width = container->pending.width + gaps, + .height = container->pending.height + gaps, }; if (wlr_box_contains_point(&box, lx, ly)) {