summaryrefslogtreecommitdiffstats
path: root/sway/container.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sway/container.c b/sway/container.c
index e679e823..68511156 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -43,8 +43,10 @@ swayc_t *new_output(wlc_handle handle) {
43 sway_log(L_DEBUG, "Added output %lu:%s", handle, name); 43 sway_log(L_DEBUG, "Added output %lu:%s", handle, name);
44 44
45 swayc_t *output = new_swayc(C_OUTPUT); 45 swayc_t *output = new_swayc(C_OUTPUT);
46 output->width = size->w; 46 output->x = (config->gaps_outer + config->gaps_inner) / 2;
47 output->height = size->h; 47 output->y = (config->gaps_outer + config->gaps_inner) / 2;
48 output->width = size->w - (config->gaps_outer + config->gaps_inner);
49 output->height = size->h - (config->gaps_outer + config->gaps_inner);
48 output->handle = handle; 50 output->handle = handle;
49 output->name = name ? strdup(name) : NULL; 51 output->name = name ? strdup(name) : NULL;
50 52
@@ -81,6 +83,8 @@ swayc_t *new_workspace(swayc_t *output, const char *name) {
81 swayc_t *workspace = new_swayc(C_WORKSPACE); 83 swayc_t *workspace = new_swayc(C_WORKSPACE);
82 84
83 workspace->layout = L_HORIZ; // TODO: default layout 85 workspace->layout = L_HORIZ; // TODO: default layout
86 workspace->x = output->x;
87 workspace->y = output->y;
84 workspace->width = output->width; 88 workspace->width = output->width;
85 workspace->height = output->height; 89 workspace->height = output->height;
86 workspace->name = strdup(name); 90 workspace->name = strdup(name);
@@ -143,6 +147,8 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
143 view->visible = true; 147 view->visible = true;
144 view->is_focused = true; 148 view->is_focused = true;
145 149
150 view->gaps = config->gaps_inner;
151
146 view->desired_width = -1; 152 view->desired_width = -1;
147 view->desired_height = -1; 153 view->desired_height = -1;
148 154