diff options
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c index 5579fddb..42f6a69a 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -163,6 +163,7 @@ swayc_t *new_workspace(swayc_t *output, const char *name) { | |||
163 | sway_log(L_DEBUG, "Added workspace %s for output %u", name, (unsigned int)output->handle); | 163 | sway_log(L_DEBUG, "Added workspace %s for output %u", name, (unsigned int)output->handle); |
164 | swayc_t *workspace = new_swayc(C_WORKSPACE); | 164 | swayc_t *workspace = new_swayc(C_WORKSPACE); |
165 | 165 | ||
166 | workspace->prev_layout = L_NONE; | ||
166 | workspace->layout = default_layout(output); | 167 | workspace->layout = default_layout(output); |
167 | 168 | ||
168 | workspace->x = output->x; | 169 | workspace->x = output->x; |
@@ -203,6 +204,7 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) { | |||
203 | 204 | ||
204 | sway_log(L_DEBUG, "creating container %p around %p", cont, child); | 205 | sway_log(L_DEBUG, "creating container %p around %p", cont, child); |
205 | 206 | ||
207 | cont->prev_layout = L_NONE; | ||
206 | cont->layout = layout; | 208 | cont->layout = layout; |
207 | cont->width = child->width; | 209 | cont->width = child->width; |
208 | cont->height = child->height; | 210 | cont->height = child->height; |
@@ -229,6 +231,7 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) { | |||
229 | add_child(workspace, cont); | 231 | add_child(workspace, cont); |
230 | // give them proper layouts | 232 | // give them proper layouts |
231 | cont->layout = workspace->layout; | 233 | cont->layout = workspace->layout; |
234 | cont->prev_layout = workspace->prev_layout; | ||
232 | /* TODO: might break shit in move_container!!! workspace->layout = layout; */ | 235 | /* TODO: might break shit in move_container!!! workspace->layout = layout; */ |
233 | set_focused_container_for(workspace, get_focused_view(workspace)); | 236 | set_focused_container_for(workspace, get_focused_view(workspace)); |
234 | } else { // Or is built around container | 237 | } else { // Or is built around container |