diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-30 22:23:27 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-05 18:01:43 +1000 |
commit | 06d969382988e49c7308b43dd3740c8f363cb71f (patch) | |
tree | af4d73785507709cae174f7a1dd8d40c723400a3 /sway/tree | |
parent | 0df04e27b6d865baa776c3492f08b5db8f59e6ed (diff) | |
download | sway-06d969382988e49c7308b43dd3740c8f363cb71f.tar.xz |
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, } void container_add_sibling(struct sway_container *fixed, - struct sway_container *active, int offset) { + struct sway_container *active) { if (active->workspace) { container_detach(active); } list_t *siblings = container_get_siblings(fixed); int index = list_find(siblings, fixed); - list_insert(siblings, index + offset, active); + list_insert(siblings, index + 1, active); active->parent = fixed->parent; active->workspace = fixed->workspace; container_for_each_child(active, set_workspace, NULL); @@ -1136,7 +1136,7 @@ void container_detach(struct sway_container *child) { void container_replace(struct sway_container *container, struct sway_container *replacement) { - container_add_sibling(container, replacement, 1); + container_add_sibling(container, replacement); container_detach(container); } 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) { view->container = container_create(view); if (target_sibling) { - container_add_sibling(target_sibling, view->container, 1); + container_add_sibling(target_sibling, view->container); } else { workspace_add_tiling(ws, view->container); } |