diff options
author | mwenzkowski <29407878+mwenzkowski@users.noreply.github.com> | 2019-04-16 21:20:48 +0200 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-04-16 17:05:49 -0400 |
commit | 9ac2342a673e899af87b8f8406820f2cc40bb185 (patch) | |
tree | 729b8e782b31ba58d9c02cee69e6df6c38693b15 /sway | |
parent | e9e1fbc5011b8eaaaab73be21266ee1d388d38a7 (diff) |
Don't apply hide_edge_borders to floating windows
This change matches i3's behavior.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/view.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 40432661..e8f5a299 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -221,8 +221,10 @@ void view_autoconfigure(struct sway_view *view) { con->border_top = con->border_bottom = true; con->border_left = con->border_right = true; + double y_offset = 0; + + if (!container_is_floating(con) && ws) { - if (ws) { bool smart = config->hide_edge_borders == E_SMART || (config->hide_edge_borders == E_SMART_NO_GAPS && !gaps_to_edge(view)); @@ -240,24 +242,22 @@ void view_autoconfigure(struct sway_view *view) { int bottom_y = con->y + con->height + con->current_gaps.bottom; con->border_bottom = bottom_y != ws->y + ws->height; } - } - double y_offset = 0; - - // In a tabbed or stacked container, the container's y is the top of the - // title area. We have to offset the surface y by the height of the title, - // bar, and disable any top border because we'll always have the title bar. - list_t *siblings = container_get_siblings(con); - bool show_titlebar = (siblings && siblings->length > 1) - || !config->hide_lone_tab; - if (show_titlebar && !container_is_floating(con)) { - enum sway_container_layout layout = container_parent_layout(con); - if (layout == L_TABBED) { - y_offset = container_titlebar_height(); - con->border_top = false; - } else if (layout == L_STACKED) { - y_offset = container_titlebar_height() * siblings->length; - con->border_top = false; + // In a tabbed or stacked container, the container's y is the top of the + // title area. We have to offset the surface y by the height of the title, + // bar, and disable any top border because we'll always have the title bar. + list_t *siblings = container_get_siblings(con); + bool show_titlebar = (siblings && siblings->length > 1) + || !config->hide_lone_tab; + if (show_titlebar) { + enum sway_container_layout layout = container_parent_layout(con); + if (layout == L_TABBED) { + y_offset = container_titlebar_height(); + con->border_top = false; + } else if (layout == L_STACKED) { + y_offset = container_titlebar_height() * siblings->length; + con->border_top = false; + } } } |