aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-03-29 23:08:59 -0400
committerTony Crisci <tony@dubstepdish.com>2018-03-29 23:08:59 -0400
commit92c58b1e63d41d48cfb487b04a2cb105c990bc4c (patch)
tree5a925aff530c83881d754c196aa18ac2898e61c3
parent4c394a0e9ee04b46ed349f7b3ddf67c53719b3b6 (diff)
downloadsway-92c58b1e63d41d48cfb487b04a2cb105c990bc4c.tar.xz
rename container_for_each_descendent
-rw-r--r--include/sway/tree/container.h2
-rw-r--r--sway/criteria.c2
-rw-r--r--sway/input/seat.c2
-rw-r--r--sway/tree/container.c6
-rw-r--r--sway/tree/layout.c2
-rw-r--r--sway/tree/view.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 92ff2b67..16df3ee7 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -131,7 +131,7 @@ struct sway_container *container_at(struct sway_container *parent,
/**
* Apply the function for each child of the container breadth first.
*/
-void container_for_each(struct sway_container *container,
+void container_for_each_descendent(struct sway_container *container,
void (*f)(struct sway_container *container, void *data), void *data);
#endif
diff --git a/sway/criteria.c b/sway/criteria.c
index 46961a60..247f6b75 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -435,7 +435,7 @@ list_t *container_for_crit_tokens(list_t *tokens) {
struct list_tokens list_tokens =
(struct list_tokens){create_list(), tokens};
- container_for_each(&root_container,
+ container_for_each_descendent(&root_container,
(void (*)(struct sway_container *, void *))container_match_add,
&list_tokens);
diff --git a/sway/input/seat.c b/sway/input/seat.c
index be0e15de..76d29b52 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -130,7 +130,7 @@ struct sway_seat *sway_seat_create(struct sway_input_manager *input,
// init the focus stack
wl_list_init(&seat->focus_stack);
- container_for_each(&root_container, collect_focus_iter, seat);
+ container_for_each_descendent(&root_container, collect_focus_iter, seat);
wl_signal_add(&root_container.sway_root->events.new_container,
&seat->new_container);
diff --git a/sway/tree/container.c b/sway/tree/container.c
index dade8f54..fe97d645 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -154,7 +154,7 @@ struct sway_container *container_output_create(
struct sway_container *container_workspace_create(
struct sway_container *output, const char *name) {
if (!sway_assert(output,
- "container_workspace_create called with null output")) {
+ "container_workspace_create called with null output")) {
return NULL;
}
wlr_log(L_DEBUG, "Added workspace %s for output %s", name, output->name);
@@ -178,7 +178,7 @@ struct sway_container *container_workspace_create(
struct sway_container *container_view_create(struct sway_container *sibling,
struct sway_view *sway_view) {
if (!sway_assert(sibling,
- "container_view_create called with NULL sibling/parent")) {
+ "container_view_create called with NULL sibling/parent")) {
return NULL;
}
const char *title = view_get_title(sway_view);
@@ -400,7 +400,7 @@ struct sway_container *container_at(struct sway_container *parent,
return NULL;
}
-void container_for_each(struct sway_container *con,
+void container_for_each_descendent(struct sway_container *con,
void (*f)(struct sway_container *con, void *data), void *data) {
list_t *queue = get_bfs_queue();
if (!queue) {
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 53ff9ffa..614d0505 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -592,7 +592,7 @@ static struct sway_container *get_swayc_in_direction_under(
}
} else {
wlr_log(L_DEBUG,
- "%s cont %d-%p dir %i sibling %d: %p", __func__, idx,
+ "cont %d-%p dir %i sibling %d: %p", idx,
container, dir, desired, parent->children->items[desired]);
return parent->children->items[desired];
}
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 20e657a2..d5325c31 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -45,7 +45,7 @@ void view_set_size(struct sway_view *view, int width, int height) {
}
}
-// TODO make view coordinates
+// TODO make view coordinates in layout coordinates
void view_set_position(struct sway_view *view, double ox, double oy) {
if (view->iface.set_position) {
struct wlr_box box = {