diff options
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sway/container.c b/sway/container.c index 62c5bda0..06111674 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -63,8 +63,10 @@ swayc_t *new_output(wlc_handle handle) { | |||
63 | sway_log(L_DEBUG, "Added output %lu:%s", handle, name); | 63 | sway_log(L_DEBUG, "Added output %lu:%s", handle, name); |
64 | 64 | ||
65 | swayc_t *output = new_swayc(C_OUTPUT); | 65 | swayc_t *output = new_swayc(C_OUTPUT); |
66 | output->width = size->w; | 66 | output->x = (config->gaps_outer + config->gaps_inner) / 2; |
67 | output->height = size->h; | 67 | output->y = (config->gaps_outer + config->gaps_inner) / 2; |
68 | output->width = size->w - (config->gaps_outer + config->gaps_inner); | ||
69 | output->height = size->h - (config->gaps_outer + config->gaps_inner); | ||
68 | output->handle = handle; | 70 | output->handle = handle; |
69 | output->name = name ? strdup(name) : NULL; | 71 | output->name = name ? strdup(name) : NULL; |
70 | 72 | ||
@@ -105,6 +107,8 @@ swayc_t *new_workspace(swayc_t *output, const char *name) { | |||
105 | swayc_t *workspace = new_swayc(C_WORKSPACE); | 107 | swayc_t *workspace = new_swayc(C_WORKSPACE); |
106 | 108 | ||
107 | workspace->layout = L_HORIZ; // TODO: default layout | 109 | workspace->layout = L_HORIZ; // TODO: default layout |
110 | workspace->x = output->x; | ||
111 | workspace->y = output->y; | ||
108 | workspace->width = output->width; | 112 | workspace->width = output->width; |
109 | workspace->height = output->height; | 113 | workspace->height = output->height; |
110 | workspace->name = strdup(name); | 114 | workspace->name = strdup(name); |
@@ -167,6 +171,8 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) { | |||
167 | view->visible = true; | 171 | view->visible = true; |
168 | view->is_focused = true; | 172 | view->is_focused = true; |
169 | 173 | ||
174 | view->gaps = config->gaps_inner; | ||
175 | |||
170 | view->desired_width = -1; | 176 | view->desired_width = -1; |
171 | view->desired_height = -1; | 177 | view->desired_height = -1; |
172 | 178 | ||