aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-28 23:53:51 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-28 23:53:51 +1000
commit126a82f14ff47925c7f88523ed9abe0ae9aeb7e8 (patch)
tree7cdac6c37f6ad87c056690bdeac3d5ea0489668d /sway/tree/workspace.c
parentPrepare arrange code for type safe arguments (diff)
downloadsway-126a82f14ff47925c7f88523ed9abe0ae9aeb7e8.tar.gz
sway-126a82f14ff47925c7f88523ed9abe0ae9aeb7e8.tar.zst
sway-126a82f14ff47925c7f88523ed9abe0ae9aeb7e8.zip
Fix gaps issues
* In layout command, arrange parent of parent - not sure why this is needed but it is * Remove gap adjustment when rendering * Workspace should use outer gaps, not inner * Add exceptions for tabbed and stacked containers * Don't mess with gap state when splitting a container
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index d930826e..60256336 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -694,7 +694,15 @@ void workspace_add_gaps(struct sway_container *ws) {
694 return; 694 return;
695 } 695 }
696 696
697 ws->current_gaps = ws->has_gaps ? ws->gaps_inner : config->gaps_inner; 697 ws->current_gaps = ws->has_gaps ? ws->gaps_outer : config->gaps_outer;
698
699 if (ws->layout == L_TABBED || ws->layout == L_STACKED) {
700 // We have to add inner gaps for this, because children of tabbed and
701 // stacked containers don't apply their own gaps - they assume the
702 // tabbed/stacked container is using gaps.
703 ws->current_gaps += ws->has_gaps ? ws->gaps_inner : config->gaps_inner;
704 }
705
698 ws->x += ws->current_gaps; 706 ws->x += ws->current_gaps;
699 ws->y += ws->current_gaps; 707 ws->y += ws->current_gaps;
700 ws->width -= 2 * ws->current_gaps; 708 ws->width -= 2 * ws->current_gaps;