diff options
author | 2018-08-30 22:23:27 +1000 | |
---|---|---|
committer | 2018-09-05 18:01:43 +1000 | |
commit | 06d969382988e49c7308b43dd3740c8f363cb71f (patch) | |
tree | af4d73785507709cae174f7a1dd8d40c723400a3 /sway/tree | |
parent | Fix crash when focus hits edge of root (diff) | |
download | sway-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')
-rw-r--r-- | sway/tree/container.c | 6 | ||||
-rw-r--r-- | sway/tree/view.c | 2 |
2 files changed, 4 insertions, 4 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 | ||
diff --git a/sway/tree/view.c b/sway/tree/view.c index ff63df2d..1b8d5738 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -515,7 +515,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { | |||
515 | 515 | ||
516 | view->container = container_create(view); | 516 | view->container = container_create(view); |
517 | if (target_sibling) { | 517 | if (target_sibling) { |
518 | container_add_sibling(target_sibling, view->container, 1); | 518 | container_add_sibling(target_sibling, view->container); |
519 | } else { | 519 | } else { |
520 | workspace_add_tiling(ws, view->container); | 520 | workspace_add_tiling(ws, view->container); |
521 | } | 521 | } |