diff options
author | novenary <streetwalkermc@gmail.com> | 2021-05-17 16:48:08 +0300 |
---|---|---|
committer | Tudor Brindus <vulcainus@gmail.com> | 2021-06-20 15:39:04 -0400 |
commit | dbc326ba84037252da89d1140fe6113556600314 (patch) | |
tree | 17b9f61bf9efbd66ff5da6fb9e288ab35ae352a1 /sway/tree | |
parent | Only call workspace_auto_back_and_forth when needed (diff) | |
download | sway-dbc326ba84037252da89d1140fe6113556600314.tar.gz sway-dbc326ba84037252da89d1140fe6113556600314.tar.zst sway-dbc326ba84037252da89d1140fe6113556600314.zip |
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.c | 7 |
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) { | |||
262 | con->pending.border_left = con->pending.border_right = true; | 262 | con->pending.border_left = con->pending.border_right = true; |
263 | double y_offset = 0; | 263 | double y_offset = 0; |
264 | 264 | ||
265 | if (!container_is_floating(con) && ws) { | 265 | if (!container_is_floating_or_child(con) && ws) { |
266 | if (config->hide_edge_borders == E_BOTH | 266 | if (config->hide_edge_borders == E_BOTH |
267 | || config->hide_edge_borders == E_VERTICAL) { | 267 | || config->hide_edge_borders == E_VERTICAL) { |
268 | con->pending.border_left = con->pending.x != ws->x; | 268 | con->pending.border_left = con->pending.x != ws->x; |
@@ -281,14 +281,15 @@ void view_autoconfigure(struct sway_view *view) { | |||
281 | (config->hide_edge_borders_smart == ESMART_NO_GAPS && | 281 | (config->hide_edge_borders_smart == ESMART_NO_GAPS && |
282 | !gaps_to_edge(view)); | 282 | !gaps_to_edge(view)); |
283 | if (smart) { | 283 | if (smart) { |
284 | bool show_border = container_is_floating_or_child(con) || | 284 | bool show_border = !view_is_only_visible(view); |
285 | !view_is_only_visible(view); | ||
286 | con->pending.border_left &= show_border; | 285 | con->pending.border_left &= show_border; |
287 | con->pending.border_right &= show_border; | 286 | con->pending.border_right &= show_border; |
288 | con->pending.border_top &= show_border; | 287 | con->pending.border_top &= show_border; |
289 | con->pending.border_bottom &= show_border; | 288 | con->pending.border_bottom &= show_border; |
290 | } | 289 | } |
290 | } | ||
291 | 291 | ||
292 | if (!container_is_floating(con)) { | ||
292 | // In a tabbed or stacked container, the container's y is the top of the | 293 | // In a tabbed or stacked container, the container's y is the top of the |
293 | // title area. We have to offset the surface y by the height of the title, | 294 | // title area. We have to offset the surface y by the height of the title, |
294 | // bar, and disable any top border because we'll always have the title bar. | 295 | // bar, and disable any top border because we'll always have the title bar. |