add --i3 flag to hide_edge_borders

Enables i3-compatible behavior regarding hiding the title bar on tabbed and
stacked containers with one child.

Related issues and merge requests: #3031, #3002, #2912, #2987.
This commit is contained in:
db 2019-02-24 10:00:15 +01:00 committed by Brian Ashworth
parent d4b1e71b91
commit 2510e3df38
6 changed files with 33 additions and 12 deletions

View file

@ -841,6 +841,14 @@ static void render_containers_stacked(struct sway_output *output,
static void render_containers(struct sway_output *output,
pixman_region32_t *damage, struct parent_data *parent) {
if (config->hide_lone_tab && parent->children->length == 1) {
struct sway_container *child = parent->children->items[0];
if (child->view) {
render_containers_linear(output,damage, parent);
return;
}
}
switch (parent->layout) {
case L_NONE:
case L_HORIZ: