diff options
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 0cb8d0a5..70b988f2 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -1079,13 +1079,13 @@ void container_insert_child(struct sway_container *parent, | |||
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | void container_add_sibling(struct sway_container *fixed, | 1081 | void container_add_sibling(struct sway_container *fixed, |
1082 | struct sway_container *active, int offset) { | 1082 | struct sway_container *active) { |
1083 | if (active->workspace) { | 1083 | if (active->workspace) { |
1084 | container_detach(active); | 1084 | container_detach(active); |
1085 | } | 1085 | } |
1086 | list_t *siblings = container_get_siblings(fixed); | 1086 | list_t *siblings = container_get_siblings(fixed); |
1087 | int index = list_find(siblings, fixed); | 1087 | int index = list_find(siblings, fixed); |
1088 | list_insert(siblings, index + offset, active); | 1088 | list_insert(siblings, index + 1, active); |
1089 | active->parent = fixed->parent; | 1089 | active->parent = fixed->parent; |
1090 | active->workspace = fixed->workspace; | 1090 | active->workspace = fixed->workspace; |
1091 | container_for_each_child(active, set_workspace, NULL); | 1091 | container_for_each_child(active, set_workspace, NULL); |
@@ -1136,7 +1136,7 @@ void container_detach(struct sway_container *child) { | |||
1136 | 1136 | ||
1137 | void container_replace(struct sway_container *container, | 1137 | void container_replace(struct sway_container *container, |
1138 | struct sway_container *replacement) { | 1138 | struct sway_container *replacement) { |
1139 | container_add_sibling(container, replacement, 1); | 1139 | container_add_sibling(container, replacement); |
1140 | container_detach(container); | 1140 | container_detach(container); |
1141 | } | 1141 | } |
1142 | 1142 | ||