aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authordb <github@benedik.si>2019-02-24 10:00:15 +0100
committerBrian Ashworth <bosrsf04@gmail.com>2019-02-24 15:26:37 -0500
commit2510e3df384d9ab7b27e66c27371ec44606f5d8e (patch)
tree604c78e79e5ba5c780429a69d5c617ffc0a5cbe4 /sway/desktop
parentd4b1e71b919a52fbad0ba8191259eb4f14dfd1ab (diff)
downloadsway-2510e3df384d9ab7b27e66c27371ec44606f5d8e.tar.xz
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.
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/render.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 92e623ef..5df16075 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -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: