mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
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
This commit is contained in:
parent
f5b9815128
commit
126a82f14f
4 changed files with 24 additions and 13 deletions
|
|
@ -694,7 +694,15 @@ void workspace_add_gaps(struct sway_container *ws) {
|
|||
return;
|
||||
}
|
||||
|
||||
ws->current_gaps = ws->has_gaps ? ws->gaps_inner : config->gaps_inner;
|
||||
ws->current_gaps = ws->has_gaps ? ws->gaps_outer : config->gaps_outer;
|
||||
|
||||
if (ws->layout == L_TABBED || ws->layout == L_STACKED) {
|
||||
// We have to add inner gaps for this, because children of tabbed and
|
||||
// stacked containers don't apply their own gaps - they assume the
|
||||
// tabbed/stacked container is using gaps.
|
||||
ws->current_gaps += ws->has_gaps ? ws->gaps_inner : config->gaps_inner;
|
||||
}
|
||||
|
||||
ws->x += ws->current_gaps;
|
||||
ws->y += ws->current_gaps;
|
||||
ws->width -= 2 * ws->current_gaps;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue