diff options
author | Dimitris Triantafyllidis <dtr@localhost.localdomain> | 2020-10-25 23:20:19 +0200 |
---|---|---|
committer | Tudor Brindus <me@tbrindus.ca> | 2020-10-25 21:59:40 -0400 |
commit | 0cb9282aeebddeed0b5259f153f98a45311053a5 (patch) | |
tree | 56dc508283e282b7afaca11675167809b0dcea9f | |
parent | container: Fix NULL pointer dereference (diff) | |
download | sway-0cb9282aeebddeed0b5259f153f98a45311053a5.tar.gz sway-0cb9282aeebddeed0b5259f153f98a45311053a5.tar.zst sway-0cb9282aeebddeed0b5259f153f98a45311053a5.zip |
Smart borders fix: always show borders for floating containers
Currently, in view_autoconfigure, the only condition for show_border
is !view_is_only_visible. view_is_only_visible does not cross the
boundary between the workspace's tiling and floating lists and does not
differentiate between them.
The result is, that in a workspace with zero or more tiling containers
and a single floating container, the floating container will lose its
borders as soon as it is split, provided that a only one view is visible
within the floating container.
Fixed by adjusting the condition for show_borders.
-rw-r--r-- | sway/tree/view.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 7bba2923..d699b01e 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -280,7 +280,8 @@ void view_autoconfigure(struct sway_view *view) { | |||
280 | (config->hide_edge_borders_smart == ESMART_NO_GAPS && | 280 | (config->hide_edge_borders_smart == ESMART_NO_GAPS && |
281 | !gaps_to_edge(view)); | 281 | !gaps_to_edge(view)); |
282 | if (smart) { | 282 | if (smart) { |
283 | bool show_border = !view_is_only_visible(view); | 283 | bool show_border = container_is_floating_or_child(con) || |
284 | !view_is_only_visible(view); | ||
284 | con->border_left &= show_border; | 285 | con->border_left &= show_border; |
285 | con->border_right &= show_border; | 286 | con->border_right &= show_border; |
286 | con->border_top &= show_border; | 287 | con->border_top &= show_border; |