diff options
author | Ryan Dwyer <[email protected]> | 2018-05-19 22:54:50 +1000 |
---|---|---|
committer | Ryan Dwyer <[email protected]> | 2018-05-21 20:16:56 +1000 |
commit | c08f9bf257c38c92a75988d89fba2d4de6bb2aea (patch) | |
tree | 76ea44c5548301ff4892c44838b783eeeb569c62 /sway/tree/layout.c | |
parent | ec1c4c6c3683772637dbfeaf5cdbaea4e1c6e49d (diff) |
Implement tabbed layout
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 11 |
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) { } } child->parent = NULL; + container_notify_child_title_changed(parent); + return parent; } @@ -182,6 +184,8 @@ void container_move_to(struct sway_container *container, container_sort_workspaces(new_parent); seat_set_focus(seat, new_parent); } + container_notify_child_title_changed(old_parent); + container_notify_child_title_changed(new_parent); if (old_parent) { arrange_children_of(old_parent); } @@ -234,9 +238,9 @@ static bool is_parallel(enum sway_container_layout layout, enum movement_direction dir) { switch (layout) { case L_TABBED: - case L_STACKED: case L_HORIZ: return dir == MOVE_LEFT || dir == MOVE_RIGHT; + case L_STACKED: case L_VERT: return dir == MOVE_UP || dir == MOVE_DOWN; default: @@ -485,6 +489,9 @@ void container_move(struct sway_container *container, } } + container_notify_child_title_changed(old_parent); + container_notify_child_title_changed(container->parent); + if (old_parent) { seat_set_focus(config->handler_context.seat, old_parent); seat_set_focus(config->handler_context.seat, container); @@ -832,6 +839,8 @@ struct sway_container *container_split(struct sway_container *child, container_add_child(cont, child); } + container_notify_child_title_changed(cont); + return cont; } |