diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-18 18:07:51 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-18 18:07:51 -0400 |
commit | 446d593b4ca5cf4ea5bbf9eaafe8a6f3521b4189 (patch) | |
tree | 97279d1259c4e049a74af4efa3e4b2334a6cae74 /sway/layout.c | |
parent | 8e201091a52a74d87db18c18a21fc39aedb95eb2 (diff) | |
parent | c75d5ceba475e3c6d1fae475c610c53909a83a29 (diff) |
Merge pull request #73 from KoffeinFlummi/gaps
Add support for gaps option
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/layout.c b/sway/layout.c index a6a241f4..02c92026 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -135,12 +135,12 @@ void arrange_windows(swayc_t *container, int width, int height) { { struct wlc_geometry geometry = { .origin = { - .x = container->x, - .y = container->y + .x = container->x + container->gaps / 2, + .y = container->y + container->gaps / 2 }, .size = { - .w = width, - .h = height + .w = width - container->gaps, + .h = height - container->gaps } }; if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) { @@ -148,10 +148,10 @@ void arrange_windows(swayc_t *container, int width, int height) { while (parent->type != C_OUTPUT) { parent = parent->parent; } - geometry.origin.x = 0; - geometry.origin.y = 0; - geometry.size.w = parent->width; - geometry.size.h = parent->height; + geometry.origin.x = container->gaps / 2; + geometry.origin.y = container->gaps / 2; + geometry.size.w = parent->width - container->gaps; + geometry.size.h = parent->height - container->gaps; wlc_view_set_geometry(container->handle, 0, &geometry); wlc_view_bring_to_front(container->handle); } else { |