aboutsummaryrefslogtreecommitdiffstats
path: root/sway/container.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-10-12 21:26:06 -0400
committerLibravatar GitHub <noreply@github.com>2016-10-12 21:26:06 -0400
commit4cba91803eb8c3c3ab4ebf22e94510b43f7a907d (patch)
tree5f80bbe3775f0e405895ab973c62f8bbd8ea1bf8 /sway/container.c
parentMerge pull request #952 from SirCmpwn/revert-948-floating-titlebar-click (diff)
downloadsway-4cba91803eb8c3c3ab4ebf22e94510b43f7a907d.tar.gz
sway-4cba91803eb8c3c3ab4ebf22e94510b43f7a907d.tar.zst
sway-4cba91803eb8c3c3ab4ebf22e94510b43f7a907d.zip
Revert "Fixes dealing with workspace_layout and related bugs [rfc]"
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sway/container.c b/sway/container.c
index c3461acb..9d5e2690 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -27,7 +27,6 @@ static swayc_t *new_swayc(enum swayc_types type) {
27 c->handle = -1; 27 c->handle = -1;
28 c->gaps = -1; 28 c->gaps = -1;
29 c->layout = L_NONE; 29 c->layout = L_NONE;
30 c->workspace_layout = L_NONE;
31 c->type = type; 30 c->type = type;
32 if (type != C_VIEW) { 31 if (type != C_VIEW) {
33 c->children = create_list(); 32 c->children = create_list();
@@ -210,8 +209,7 @@ swayc_t *new_workspace(swayc_t *output, const char *name) {
210 swayc_t *workspace = new_swayc(C_WORKSPACE); 209 swayc_t *workspace = new_swayc(C_WORKSPACE);
211 210
212 workspace->prev_layout = L_NONE; 211 workspace->prev_layout = L_NONE;
213 workspace->layout = L_HORIZ; 212 workspace->layout = default_layout(output);
214 workspace->workspace_layout = default_layout(output);
215 213
216 workspace->x = output->x; 214 workspace->x = output->x;
217 workspace->y = output->y; 215 workspace->y = output->y;
@@ -264,7 +262,7 @@ swayc_t *new_container(swayc_t *child, enum swayc_layouts layout) {
264 // add container to workspace chidren 262 // add container to workspace chidren
265 add_child(workspace, cont); 263 add_child(workspace, cont);
266 // give them proper layouts 264 // give them proper layouts
267 cont->layout = workspace->workspace_layout; 265 cont->layout = workspace->layout;
268 cont->prev_layout = workspace->prev_layout; 266 cont->prev_layout = workspace->prev_layout;
269 /* TODO: might break shit in move_container!!! workspace->layout = layout; */ 267 /* TODO: might break shit in move_container!!! workspace->layout = layout; */
270 set_focused_container_for(workspace, get_focused_view(workspace)); 268 set_focused_container_for(workspace, get_focused_view(workspace));
@@ -931,12 +929,3 @@ swayc_t *swayc_tabbed_stacked_parent(swayc_t *con) {
931 } 929 }
932 return NULL; 930 return NULL;
933} 931}
934
935swayc_t *swayc_change_layout(swayc_t *container, enum swayc_layouts layout) {
936 if (container->type == C_WORKSPACE) {
937 container->workspace_layout = layout;
938 } else {
939 container->layout = layout;
940 }
941 return container;
942}