mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Merge pull request #96 from KoffeinFlummi/gap-fix
Change gap behaviour to more closely match i3-gaps
This commit is contained in:
commit
616d630fb0
|
@ -67,7 +67,7 @@ swayc_t *new_output(wlc_handle handle) {
|
||||||
output->height = size->h;
|
output->height = size->h;
|
||||||
output->handle = handle;
|
output->handle = handle;
|
||||||
output->name = name ? strdup(name) : NULL;
|
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);
|
add_child(&root_container, output);
|
||||||
|
|
||||||
|
|
|
@ -152,12 +152,12 @@ void arrange_windows(swayc_t *container, int width, int height) {
|
||||||
{
|
{
|
||||||
struct wlc_geometry geometry = {
|
struct wlc_geometry geometry = {
|
||||||
.origin = {
|
.origin = {
|
||||||
.x = container->x + container->gaps,
|
.x = container->x + container->gaps / 2,
|
||||||
.y = container->y + container->gaps
|
.y = container->y + container->gaps / 2
|
||||||
},
|
},
|
||||||
.size = {
|
.size = {
|
||||||
.w = width - container->gaps * 2,
|
.w = width - container->gaps,
|
||||||
.h = height - container->gaps * 2
|
.h = height - container->gaps
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) {
|
if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) {
|
||||||
|
|
Loading…
Reference in a new issue