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.
master
Dimitris Triantafyllidis 4 years ago committed by Tudor Brindus
parent 13a67da614
commit 0cb9282aee

@ -280,7 +280,8 @@ void view_autoconfigure(struct sway_view *view) {
(config->hide_edge_borders_smart == ESMART_NO_GAPS && (config->hide_edge_borders_smart == ESMART_NO_GAPS &&
!gaps_to_edge(view)); !gaps_to_edge(view));
if (smart) { if (smart) {
bool show_border = !view_is_only_visible(view); bool show_border = container_is_floating_or_child(con) ||
!view_is_only_visible(view);
con->border_left &= show_border; con->border_left &= show_border;
con->border_right &= show_border; con->border_right &= show_border;
con->border_top &= show_border; con->border_top &= show_border;

Loading…
Cancel
Save