aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 23:08:59 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 23:08:59 -0400
commit92c58b1e63d41d48cfb487b04a2cb105c990bc4c (patch)
tree5a925aff530c83881d754c196aa18ac2898e61c3
parentaddress feedback (diff)
downloadsway-92c58b1e63d41d48cfb487b04a2cb105c990bc4c.tar.gz
sway-92c58b1e63d41d48cfb487b04a2cb105c990bc4c.tar.zst
sway-92c58b1e63d41d48cfb487b04a2cb105c990bc4c.zip
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,
131/** 131/**
132 * Apply the function for each child of the container breadth first. 132 * Apply the function for each child of the container breadth first.
133 */ 133 */
134void container_for_each(struct sway_container *container, 134void container_for_each_descendent(struct sway_container *container,
135 void (*f)(struct sway_container *container, void *data), void *data); 135 void (*f)(struct sway_container *container, void *data), void *data);
136 136
137#endif 137#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) {
435 struct list_tokens list_tokens = 435 struct list_tokens list_tokens =
436 (struct list_tokens){create_list(), tokens}; 436 (struct list_tokens){create_list(), tokens};
437 437
438 container_for_each(&root_container, 438 container_for_each_descendent(&root_container,
439 (void (*)(struct sway_container *, void *))container_match_add, 439 (void (*)(struct sway_container *, void *))container_match_add,
440 &list_tokens); 440 &list_tokens);
441 441
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,
130 // init the focus stack 130 // init the focus stack
131 wl_list_init(&seat->focus_stack); 131 wl_list_init(&seat->focus_stack);
132 132
133 container_for_each(&root_container, collect_focus_iter, seat); 133 container_for_each_descendent(&root_container, collect_focus_iter, seat);
134 134
135 wl_signal_add(&root_container.sway_root->events.new_container, 135 wl_signal_add(&root_container.sway_root->events.new_container,
136 &seat->new_container); 136 &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(
154struct sway_container *container_workspace_create( 154struct sway_container *container_workspace_create(
155 struct sway_container *output, const char *name) { 155 struct sway_container *output, const char *name) {
156 if (!sway_assert(output, 156 if (!sway_assert(output,
157 "container_workspace_create called with null output")) { 157 "container_workspace_create called with null output")) {
158 return NULL; 158 return NULL;
159 } 159 }
160 wlr_log(L_DEBUG, "Added workspace %s for output %s", name, output->name); 160 wlr_log(L_DEBUG, "Added workspace %s for output %s", name, output->name);
@@ -178,7 +178,7 @@ struct sway_container *container_workspace_create(
178struct sway_container *container_view_create(struct sway_container *sibling, 178struct sway_container *container_view_create(struct sway_container *sibling,
179 struct sway_view *sway_view) { 179 struct sway_view *sway_view) {
180 if (!sway_assert(sibling, 180 if (!sway_assert(sibling,
181 "container_view_create called with NULL sibling/parent")) { 181 "container_view_create called with NULL sibling/parent")) {
182 return NULL; 182 return NULL;
183 } 183 }
184 const char *title = view_get_title(sway_view); 184 const char *title = view_get_title(sway_view);
@@ -400,7 +400,7 @@ struct sway_container *container_at(struct sway_container *parent,
400 return NULL; 400 return NULL;
401} 401}
402 402
403void container_for_each(struct sway_container *con, 403void container_for_each_descendent(struct sway_container *con,
404 void (*f)(struct sway_container *con, void *data), void *data) { 404 void (*f)(struct sway_container *con, void *data), void *data) {
405 list_t *queue = get_bfs_queue(); 405 list_t *queue = get_bfs_queue();
406 if (!queue) { 406 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(
592 } 592 }
593 } else { 593 } else {
594 wlr_log(L_DEBUG, 594 wlr_log(L_DEBUG,
595 "%s cont %d-%p dir %i sibling %d: %p", __func__, idx, 595 "cont %d-%p dir %i sibling %d: %p", idx,
596 container, dir, desired, parent->children->items[desired]); 596 container, dir, desired, parent->children->items[desired]);
597 return parent->children->items[desired]; 597 return parent->children->items[desired];
598 } 598 }
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) {
45 } 45 }
46} 46}
47 47
48// TODO make view coordinates 48// TODO make view coordinates in layout coordinates
49void view_set_position(struct sway_view *view, double ox, double oy) { 49void view_set_position(struct sway_view *view, double ox, double oy) {
50 if (view->iface.set_position) { 50 if (view->iface.set_position) {
51 struct wlr_box box = { 51 struct wlr_box box = {