smart_borders: separate smartness from edge types

This commit is contained in:
Ronan Pigott 2019-11-04 15:10:40 -07:00 committed by Brian Ashworth
parent 38b37247ff
commit 3975ca28c2
6 changed files with 24 additions and 19 deletions

View file

@ -215,8 +215,8 @@ void view_autoconfigure(struct sway_view *view) {
if (!container_is_floating(con) && ws) {
bool smart = config->hide_edge_borders == E_SMART ||
(config->hide_edge_borders == E_SMART_NO_GAPS &&
bool smart = config->hide_edge_borders_smart == ESMART_ON ||
(config->hide_edge_borders_smart == ESMART_NO_GAPS &&
!gaps_to_edge(view));
bool hide_smart = smart && view_is_only_visible(view);