aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authornovenary <streetwalkermc@gmail.com>2021-05-17 16:48:08 +0300
committerTudor Brindus <vulcainus@gmail.com>2021-06-20 15:39:04 -0400
commitdbc326ba84037252da89d1140fe6113556600314 (patch)
tree17b9f61bf9efbd66ff5da6fb9e288ab35ae352a1 /sway/tree
parentd5c71231e5d17db9f33284f6c4f16aeb2e3ec2a6 (diff)
downloadsway-dbc326ba84037252da89d1140fe6113556600314.tar.xz
Don't apply hide_edge_borders to any floating container
This fixes the following scenario: - Place a floating window so its border is right at the edge of the screen - Create a new split - The border disappears - Moving the window does not restore the border
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/view.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 33d16e29..fcdd06f7 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -262,7 +262,7 @@ void view_autoconfigure(struct sway_view *view) {
con->pending.border_left = con->pending.border_right = true;
double y_offset = 0;
- if (!container_is_floating(con) && ws) {
+ if (!container_is_floating_or_child(con) && ws) {
if (config->hide_edge_borders == E_BOTH
|| config->hide_edge_borders == E_VERTICAL) {
con->pending.border_left = con->pending.x != ws->x;
@@ -281,14 +281,15 @@ void view_autoconfigure(struct sway_view *view) {
(config->hide_edge_borders_smart == ESMART_NO_GAPS &&
!gaps_to_edge(view));
if (smart) {
- bool show_border = container_is_floating_or_child(con) ||
- !view_is_only_visible(view);
+ bool show_border = !view_is_only_visible(view);
con->pending.border_left &= show_border;
con->pending.border_right &= show_border;
con->pending.border_top &= show_border;
con->pending.border_bottom &= show_border;
}
+ }
+ if (!container_is_floating(con)) {
// 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.