aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-30 22:23:27 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-05 18:01:43 +1000
commit06d969382988e49c7308b43dd3740c8f363cb71f (patch)
treeaf4d73785507709cae174f7a1dd8d40c723400a3 /sway/tree/container.c
parentFix crash when focus hits edge of root (diff)
downloadsway-06d969382988e49c7308b43dd3740c8f363cb71f.tar.gz
sway-06d969382988e49c7308b43dd3740c8f363cb71f.tar.zst
sway-06d969382988e49c7308b43dd3740c8f363cb71f.zip
Remove offset argument to container_add_sibling
I added this thinking that it might come in useful. Turns out it didn't.
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c6
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
1081void container_add_sibling(struct sway_container *fixed, 1081void 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
1137void container_replace(struct sway_container *container, 1137void 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