diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-04-01 15:58:29 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-04-25 00:00:49 +0200 |
commit | d26658fb355fdf7feee2d6aa801e487502e6ce8b (patch) | |
tree | 1879cf81d8e55b676bbd4a5b44dd23d5d93e8b5f /sway/container.c | |
parent | 8d700fe008ccf9f7eb4664e236277c9f30a449fb (diff) |
Correctly determine default layout
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sway/container.c b/sway/container.c index 2b100f40..5579fddb 100644 --- a/sway/container.c +++ b/sway/container.c @@ -163,16 +163,8 @@ swayc_t *new_workspace(swayc_t *output, const char *name) { sway_log(L_DEBUG, "Added workspace %s for output %u", name, (unsigned int)output->handle); swayc_t *workspace = new_swayc(C_WORKSPACE); - // TODO: default_layout - if (config->default_layout != L_NONE) { - workspace->layout = config->default_layout; - } else if (config->default_orientation != L_NONE) { - workspace->layout = config->default_orientation; - } else if (output->width >= output->height) { - workspace->layout = L_HORIZ; - } else { - workspace->layout = L_VERT; - } + workspace->layout = default_layout(output); + workspace->x = output->x; workspace->y = output->y; workspace->width = output->width; |