mirror of
https://github.com/swaywm/sway.git
synced 2024-11-19 14:39:15 +00:00
Remove offset argument to container_add_sibling
I added this thinking that it might come in useful. Turns out it didn't.
This commit is contained in:
parent
0df04e27b6
commit
06d9693829
|
@ -279,7 +279,7 @@ void container_insert_child(struct sway_container *parent,
|
||||||
struct sway_container *child, int i);
|
struct sway_container *child, int i);
|
||||||
|
|
||||||
void container_add_sibling(struct sway_container *parent,
|
void container_add_sibling(struct sway_container *parent,
|
||||||
struct sway_container *child, int offset);
|
struct sway_container *child);
|
||||||
|
|
||||||
void container_detach(struct sway_container *child);
|
void container_detach(struct sway_container *child);
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ static void container_move_to_container(struct sway_container *container,
|
||||||
container->saved_width = container->saved_height = 0;
|
container->saved_width = container->saved_height = 0;
|
||||||
|
|
||||||
if (destination->view) {
|
if (destination->view) {
|
||||||
container_add_sibling(destination, container, 1);
|
container_add_sibling(destination, container);
|
||||||
} else {
|
} else {
|
||||||
container_add_child(destination, container);
|
container_add_child(destination, container);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1079,13 +1079,13 @@ void container_insert_child(struct sway_container *parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
void container_add_sibling(struct sway_container *fixed,
|
void container_add_sibling(struct sway_container *fixed,
|
||||||
struct sway_container *active, int offset) {
|
struct sway_container *active) {
|
||||||
if (active->workspace) {
|
if (active->workspace) {
|
||||||
container_detach(active);
|
container_detach(active);
|
||||||
}
|
}
|
||||||
list_t *siblings = container_get_siblings(fixed);
|
list_t *siblings = container_get_siblings(fixed);
|
||||||
int index = list_find(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->parent = fixed->parent;
|
||||||
active->workspace = fixed->workspace;
|
active->workspace = fixed->workspace;
|
||||||
container_for_each_child(active, set_workspace, NULL);
|
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,
|
void container_replace(struct sway_container *container,
|
||||||
struct sway_container *replacement) {
|
struct sway_container *replacement) {
|
||||||
container_add_sibling(container, replacement, 1);
|
container_add_sibling(container, replacement);
|
||||||
container_detach(container);
|
container_detach(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -515,7 +515,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {
|
||||||
|
|
||||||
view->container = container_create(view);
|
view->container = container_create(view);
|
||||||
if (target_sibling) {
|
if (target_sibling) {
|
||||||
container_add_sibling(target_sibling, view->container, 1);
|
container_add_sibling(target_sibling, view->container);
|
||||||
} else {
|
} else {
|
||||||
workspace_add_tiling(ws, view->container);
|
workspace_add_tiling(ws, view->container);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue