aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-19 22:54:50 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-21 20:16:56 +1000
commitc08f9bf257c38c92a75988d89fba2d4de6bb2aea (patch)
tree76ea44c5548301ff4892c44838b783eeeb569c62 /sway/tree/layout.c
parentMerge pull request #2011 from RyanDwyer/fix-hide-edge-border-bottom (diff)
downloadsway-c08f9bf257c38c92a75988d89fba2d4de6bb2aea.tar.gz
sway-c08f9bf257c38c92a75988d89fba2d4de6bb2aea.tar.zst
sway-c08f9bf257c38c92a75988d89fba2d4de6bb2aea.zip
Implement tabbed layout
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index ec1c6fe5..f8acdf6c 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -149,6 +149,8 @@ struct sway_container *container_remove_child(struct sway_container *child) {
149 } 149 }
150 } 150 }
151 child->parent = NULL; 151 child->parent = NULL;
152 container_notify_child_title_changed(parent);
153
152 return parent; 154 return parent;
153} 155}
154 156
@@ -182,6 +184,8 @@ void container_move_to(struct sway_container *container,
182 container_sort_workspaces(new_parent); 184 container_sort_workspaces(new_parent);
183 seat_set_focus(seat, new_parent); 185 seat_set_focus(seat, new_parent);
184 } 186 }
187 container_notify_child_title_changed(old_parent);
188 container_notify_child_title_changed(new_parent);
185 if (old_parent) { 189 if (old_parent) {
186 arrange_children_of(old_parent); 190 arrange_children_of(old_parent);
187 } 191 }
@@ -234,9 +238,9 @@ static bool is_parallel(enum sway_container_layout layout,
234 enum movement_direction dir) { 238 enum movement_direction dir) {
235 switch (layout) { 239 switch (layout) {
236 case L_TABBED: 240 case L_TABBED:
237 case L_STACKED:
238 case L_HORIZ: 241 case L_HORIZ:
239 return dir == MOVE_LEFT || dir == MOVE_RIGHT; 242 return dir == MOVE_LEFT || dir == MOVE_RIGHT;
243 case L_STACKED:
240 case L_VERT: 244 case L_VERT:
241 return dir == MOVE_UP || dir == MOVE_DOWN; 245 return dir == MOVE_UP || dir == MOVE_DOWN;
242 default: 246 default:
@@ -485,6 +489,9 @@ void container_move(struct sway_container *container,
485 } 489 }
486 } 490 }
487 491
492 container_notify_child_title_changed(old_parent);
493 container_notify_child_title_changed(container->parent);
494
488 if (old_parent) { 495 if (old_parent) {
489 seat_set_focus(config->handler_context.seat, old_parent); 496 seat_set_focus(config->handler_context.seat, old_parent);
490 seat_set_focus(config->handler_context.seat, container); 497 seat_set_focus(config->handler_context.seat, container);
@@ -832,6 +839,8 @@ struct sway_container *container_split(struct sway_container *child,
832 container_add_child(cont, child); 839 container_add_child(cont, child);
833 } 840 }
834 841
842 container_notify_child_title_changed(cont);
843
835 return cont; 844 return cont;
836} 845}
837 846