diff options
author | emersion <[email protected]> | 2018-05-21 11:24:05 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2018-05-21 11:24:05 +0100 |
commit | a7adbf4b79dce4d61de1a8a71cba535aeae6bc76 (patch) | |
tree | 68210775c09209884b46b5866ca1b4530ca24324 /sway/tree/layout.c | |
parent | ec1c4c6c3683772637dbfeaf5cdbaea4e1c6e49d (diff) | |
parent | 048b29527b8b0ec9c6cd9d0439b74bf73f4f6e2d (diff) |
Merge pull request #2005 from RyanDwyer/tabbed-layout
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; } |