diff options
author | Evy Garden <[email protected]> | 2023-07-07 05:11:21 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-06 23:11:21 -0400 |
commit | 061dfaa2e7dcc823c1313d64ddd06000f0d7ab30 (patch) | |
tree | 17277e9eb93f695ddfede0e4caabf84f09c813be /sway/desktop/render.c | |
parent | ab8106add4f59f465e0fe40651d82d3a021f2eff (diff) |
Fix toplevel borders (#171)
* added check for smart
* expose gaps_to_edge
* add smart variable
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 50f7d70b..8510cf68 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -720,8 +720,14 @@ static void render_view_toplevels(struct sway_view *view, struct sway_output *ou clip_box.y = state.y - output->ly; clip_box.width = state.width; clip_box.height = state.height; + + bool smart = config->hide_edge_borders_smart == ESMART_ON || + (config->hide_edge_borders_smart == ESMART_NO_GAPS && + !gaps_to_edge(view)); + if (state.fullscreen_mode == FULLSCREEN_NONE - && (state.border == B_PIXEL || state.border == B_NORMAL)) { + && (state.border == B_PIXEL || state.border == B_NORMAL) + && !smart) { clip_box.x += state.border_thickness; clip_box.width -= state.border_thickness * 2; |