diff options
author | KoffeinFlummi <koffeinflummi@gmail.com> | 2015-08-20 08:46:06 +0200 |
---|---|---|
committer | KoffeinFlummi <koffeinflummi@gmail.com> | 2015-08-20 08:47:51 +0200 |
commit | 3c124d9e7d56559ff6c82ac313cb7ee065bc839f (patch) | |
tree | 5819c5982ee8604e1566c0960d939c2df687e665 | |
parent | 4db89b5fe46e8e7dc741b0ccb9fa3d0708c6fa59 (diff) | |
download | sway-3c124d9e7d56559ff6c82ac313cb7ee065bc839f.tar.xz |
Change gap behaviour to more closely match i3-gaps
Previously, when only using inner gaps, the gap between a window at the
edge of the output was only half the size of the gaps between views.
Additionally, the gaps between the actual windows was twice as wide as
it was on i3-gaps.
-rw-r--r-- | sway/container.c | 2 | ||||
-rw-r--r-- | sway/layout.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sway/container.c b/sway/container.c index 9c6b78e9..dee4028d 100644 --- a/sway/container.c +++ b/sway/container.c @@ -67,7 +67,7 @@ swayc_t *new_output(wlc_handle handle) { output->height = size->h; output->handle = handle; output->name = name ? strdup(name) : NULL; - output->gaps = config->gaps_outer; + output->gaps = config->gaps_outer + config->gaps_inner / 2; add_child(&root_container, output); diff --git a/sway/layout.c b/sway/layout.c index eb8391ce..e628c5ed 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -152,12 +152,12 @@ void arrange_windows(swayc_t *container, int width, int height) { { struct wlc_geometry geometry = { .origin = { - .x = container->x + container->gaps, - .y = container->y + container->gaps + .x = container->x + container->gaps / 2, + .y = container->y + container->gaps / 2 }, .size = { - .w = width - container->gaps * 2, - .h = height - container->gaps * 2 + .w = width - container->gaps, + .h = height - container->gaps } }; if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) { |