aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sway/desktop/transaction.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index 16ce8e2e..01fe3128 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -312,9 +312,9 @@ static void arrange_children(enum sway_container_layout layout, list_t *children
wlr_scene_node_set_position(&child->scene_tree->node, 0, title_bar_height);
wlr_scene_node_reparent(&child->scene_tree->node, content);
- height -= title_bar_height;
- if (activated && width > 0 && height > 0) {
- arrange_container(child, width, height, title_bar_height == 0, 0);
+ int net_height = height - title_bar_height;
+ if (activated && width > 0 && net_height > 0) {
+ arrange_container(child, width, net_height, title_bar_height == 0, 0);
} else {
disable_container(child);
}
@@ -341,9 +341,9 @@ static void arrange_children(enum sway_container_layout layout, list_t *children
wlr_scene_node_set_position(&child->scene_tree->node, 0, title_height);
wlr_scene_node_reparent(&child->scene_tree->node, content);
- height -= title_bar_height;
- if (activated && width > 0 && height > 0) {
- arrange_container(child, width, height, title_bar_height == 0, 0);
+ int net_height = height - title_bar_height;
+ if (activated && width > 0 && net_height > 0) {
+ arrange_container(child, width, net_height, title_bar_height == 0, 0);
} else {
disable_container(child);
}