aboutsummaryrefslogtreecommitdiff
path: root/sway/layout.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-03-20 07:45:51 -0400
committerDrew DeVault <sir@cmpwn.com>2016-03-20 07:45:51 -0400
commit599d6ab65174263cbacb730e674bf20c024c909a (patch)
treecce18134cdc904d0d3ba720e245dcf96274f564b /sway/layout.c
parent00c1ce4fdab3f2618f8719225f46e13949389ac7 (diff)
parent2935e24cf506ea2ab18952b3d525db0ef4d83762 (diff)
downloadsway-599d6ab65174263cbacb730e674bf20c024c909a.tar.xz
Merge pull request #524 from mikkeloscar/smart-gaps
Implement 'smart_gaps' feature from i3-gaps
Diffstat (limited to 'sway/layout.c')
-rw-r--r--sway/layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c
index e9998bc8..d9c4598f 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -406,7 +406,7 @@ void update_geometry(swayc_t *container) {
if (op->focused == ws) {
wlc_view_bring_to_front(container->handle);
}
- } else if (!config->edge_gaps && gap > 0) {
+ } else if ((!config->edge_gaps && gap > 0) || (config->smart_gaps && ws->children->length == 1)) {
// Remove gap against the workspace edges. Because a pixel is not
// divisable, depending on gap size and the number of siblings our view
// might be at the workspace edge without being exactly so (thus test