diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-29 17:06:29 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-03-29 17:06:29 -0400 |
commit | eca029f218fbb54ddf7316845be5d296e834358e (patch) | |
tree | 76bf346c980ad94c68797cefbd2ec4a9302dd53f /sway/desktop | |
parent | rename container functions (diff) | |
download | sway-eca029f218fbb54ddf7316845be5d296e834358e.tar.gz sway-eca029f218fbb54ddf7316845be5d296e834358e.tar.zst sway-eca029f218fbb54ddf7316845be5d296e834358e.zip |
more renaming things
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/layer_shell.c | 2 | ||||
-rw-r--r-- | sway/desktop/output.c | 12 | ||||
-rw-r--r-- | sway/desktop/wl_shell.c | 8 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 8 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 22 |
5 files changed, 26 insertions, 26 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index 137b3260..4bfd1c45 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c | |||
@@ -172,7 +172,7 @@ void arrange_layers(struct sway_output *output) { | |||
172 | if (memcmp(&usable_area_before, | 172 | if (memcmp(&usable_area_before, |
173 | &usable_area, sizeof(struct wlr_box)) != 0) { | 173 | &usable_area, sizeof(struct wlr_box)) != 0) { |
174 | wlr_log(L_DEBUG, "arrange"); | 174 | wlr_log(L_DEBUG, "arrange"); |
175 | arrange_windows(output->swayc, -1, -1); | 175 | container_arrange_windows(output->swayc, -1, -1); |
176 | } | 176 | } |
177 | 177 | ||
178 | // Arrange non-exlusive surfaces from top->bottom | 178 | // Arrange non-exlusive surfaces from top->bottom |
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 3e7d8509..fa1b0680 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -221,13 +221,13 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { | |||
221 | struct sway_container *focus = sway_seat_get_focus_inactive(seat, soutput->swayc); | 221 | struct sway_container *focus = sway_seat_get_focus_inactive(seat, soutput->swayc); |
222 | struct sway_container *workspace = (focus->type == C_WORKSPACE ? | 222 | struct sway_container *workspace = (focus->type == C_WORKSPACE ? |
223 | focus : | 223 | focus : |
224 | sway_container_parent(focus, C_WORKSPACE)); | 224 | container_parent(focus, C_WORKSPACE)); |
225 | 225 | ||
226 | struct render_data rdata = { | 226 | struct render_data rdata = { |
227 | .output = soutput, | 227 | .output = soutput, |
228 | .now = &now, | 228 | .now = &now, |
229 | }; | 229 | }; |
230 | sway_container_descendents(workspace, C_VIEW, output_frame_view, &rdata); | 230 | container_descendents(workspace, C_VIEW, output_frame_view, &rdata); |
231 | 231 | ||
232 | // render unmanaged views on top | 232 | // render unmanaged views on top |
233 | struct sway_view *view; | 233 | struct sway_view *view; |
@@ -258,13 +258,13 @@ static void handle_output_destroy(struct wl_listener *listener, void *data) { | |||
258 | struct wlr_output *wlr_output = data; | 258 | struct wlr_output *wlr_output = data; |
259 | wlr_log(L_DEBUG, "Output %p %s removed", wlr_output, wlr_output->name); | 259 | wlr_log(L_DEBUG, "Output %p %s removed", wlr_output, wlr_output->name); |
260 | 260 | ||
261 | sway_container_output_destroy(output->swayc); | 261 | container_output_destroy(output->swayc); |
262 | } | 262 | } |
263 | 263 | ||
264 | static void handle_output_mode(struct wl_listener *listener, void *data) { | 264 | static void handle_output_mode(struct wl_listener *listener, void *data) { |
265 | struct sway_output *output = wl_container_of(listener, output, mode); | 265 | struct sway_output *output = wl_container_of(listener, output, mode); |
266 | arrange_layers(output); | 266 | arrange_layers(output); |
267 | arrange_windows(output->swayc, -1, -1); | 267 | container_arrange_windows(output->swayc, -1, -1); |
268 | } | 268 | } |
269 | 269 | ||
270 | void handle_new_output(struct wl_listener *listener, void *data) { | 270 | void handle_new_output(struct wl_listener *listener, void *data) { |
@@ -286,7 +286,7 @@ void handle_new_output(struct wl_listener *listener, void *data) { | |||
286 | wlr_output_set_mode(wlr_output, mode); | 286 | wlr_output_set_mode(wlr_output, mode); |
287 | } | 287 | } |
288 | 288 | ||
289 | output->swayc = sway_container_output_create(output); | 289 | output->swayc = container_output_create(output); |
290 | if (!output->swayc) { | 290 | if (!output->swayc) { |
291 | free(output); | 291 | free(output); |
292 | return; | 292 | return; |
@@ -307,5 +307,5 @@ void handle_new_output(struct wl_listener *listener, void *data) { | |||
307 | output->mode.notify = handle_output_mode; | 307 | output->mode.notify = handle_output_mode; |
308 | 308 | ||
309 | arrange_layers(output); | 309 | arrange_layers(output); |
310 | arrange_windows(&root_container, -1, -1); | 310 | container_arrange_windows(&root_container, -1, -1); |
311 | } | 311 | } |
diff --git a/sway/desktop/wl_shell.c b/sway/desktop/wl_shell.c index bf41d7bf..ac1c7f26 100644 --- a/sway/desktop/wl_shell.c +++ b/sway/desktop/wl_shell.c | |||
@@ -74,10 +74,10 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
74 | wl_container_of(listener, sway_surface, destroy); | 74 | wl_container_of(listener, sway_surface, destroy); |
75 | wl_list_remove(&sway_surface->commit.link); | 75 | wl_list_remove(&sway_surface->commit.link); |
76 | wl_list_remove(&sway_surface->destroy.link); | 76 | wl_list_remove(&sway_surface->destroy.link); |
77 | struct sway_container *parent = sway_container_view_destroy(sway_surface->view->swayc); | 77 | struct sway_container *parent = container_view_destroy(sway_surface->view->swayc); |
78 | free(sway_surface->view); | 78 | free(sway_surface->view); |
79 | free(sway_surface); | 79 | free(sway_surface); |
80 | arrange_windows(parent, -1, -1); | 80 | container_arrange_windows(parent, -1, -1); |
81 | } | 81 | } |
82 | 82 | ||
83 | void handle_wl_shell_surface(struct wl_listener *listener, void *data) { | 83 | void handle_wl_shell_surface(struct wl_listener *listener, void *data) { |
@@ -133,9 +133,9 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) { | |||
133 | 133 | ||
134 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 134 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
135 | struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container); | 135 | struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container); |
136 | struct sway_container *cont = sway_container_view_create(focus, sway_view); | 136 | struct sway_container *cont = container_view_create(focus, sway_view); |
137 | sway_view->swayc = cont; | 137 | sway_view->swayc = cont; |
138 | 138 | ||
139 | arrange_windows(cont->parent, -1, -1); | 139 | container_arrange_windows(cont->parent, -1, -1); |
140 | sway_input_manager_set_focus(input_manager, cont); | 140 | sway_input_manager_set_focus(input_manager, cont); |
141 | } | 141 | } |
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 6b50d470..616cb88f 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -83,10 +83,10 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
83 | wl_container_of(listener, sway_xdg_surface, destroy); | 83 | wl_container_of(listener, sway_xdg_surface, destroy); |
84 | wl_list_remove(&sway_xdg_surface->commit.link); | 84 | wl_list_remove(&sway_xdg_surface->commit.link); |
85 | wl_list_remove(&sway_xdg_surface->destroy.link); | 85 | wl_list_remove(&sway_xdg_surface->destroy.link); |
86 | struct sway_container *parent = sway_container_view_destroy(sway_xdg_surface->view->swayc); | 86 | struct sway_container *parent = container_view_destroy(sway_xdg_surface->view->swayc); |
87 | free(sway_xdg_surface->view); | 87 | free(sway_xdg_surface->view); |
88 | free(sway_xdg_surface); | 88 | free(sway_xdg_surface); |
89 | arrange_windows(parent, -1, -1); | 89 | container_arrange_windows(parent, -1, -1); |
90 | } | 90 | } |
91 | 91 | ||
92 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { | 92 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { |
@@ -137,10 +137,10 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { | |||
137 | 137 | ||
138 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 138 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
139 | struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container); | 139 | struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container); |
140 | struct sway_container *cont = sway_container_view_create(focus, sway_view); | 140 | struct sway_container *cont = container_view_create(focus, sway_view); |
141 | sway_view->swayc = cont; | 141 | sway_view->swayc = cont; |
142 | 142 | ||
143 | arrange_windows(cont->parent, -1, -1); | 143 | container_arrange_windows(cont->parent, -1, -1); |
144 | 144 | ||
145 | sway_input_manager_set_focus(input_manager, cont); | 145 | sway_input_manager_set_focus(input_manager, cont); |
146 | } | 146 | } |
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 96edab51..fa1054f2 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -49,11 +49,11 @@ static void set_position(struct sway_view *view, double ox, double oy) { | |||
49 | if (!assert_xwayland(view)) { | 49 | if (!assert_xwayland(view)) { |
50 | return; | 50 | return; |
51 | } | 51 | } |
52 | struct sway_container *output = sway_container_parent(view->swayc, C_OUTPUT); | 52 | struct sway_container *output = container_parent(view->swayc, C_OUTPUT); |
53 | if (!sway_assert(output, "view must be within tree to set position")) { | 53 | if (!sway_assert(output, "view must be within tree to set position")) { |
54 | return; | 54 | return; |
55 | } | 55 | } |
56 | struct sway_container *root = sway_container_parent(output, C_ROOT); | 56 | struct sway_container *root = container_parent(output, C_ROOT); |
57 | if (!sway_assert(root, "output must be within tree to set position")) { | 57 | if (!sway_assert(root, "output must be within tree to set position")) { |
58 | return; | 58 | return; |
59 | } | 59 | } |
@@ -114,9 +114,9 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | struct sway_container *parent = sway_container_view_destroy(sway_surface->view->swayc); | 117 | struct sway_container *parent = container_view_destroy(sway_surface->view->swayc); |
118 | if (parent) { | 118 | if (parent) { |
119 | arrange_windows(parent, -1, -1); | 119 | container_arrange_windows(parent, -1, -1); |
120 | } | 120 | } |
121 | 121 | ||
122 | free(sway_surface->view); | 122 | free(sway_surface->view); |
@@ -132,9 +132,9 @@ static void handle_unmap_notify(struct wl_listener *listener, void *data) { | |||
132 | } | 132 | } |
133 | 133 | ||
134 | // take it out of the tree | 134 | // take it out of the tree |
135 | struct sway_container *parent = sway_container_view_destroy(sway_surface->view->swayc); | 135 | struct sway_container *parent = container_view_destroy(sway_surface->view->swayc); |
136 | if (parent) { | 136 | if (parent) { |
137 | arrange_windows(parent, -1, -1); | 137 | container_arrange_windows(parent, -1, -1); |
138 | } | 138 | } |
139 | 139 | ||
140 | sway_surface->view->swayc = NULL; | 140 | sway_surface->view->swayc = NULL; |
@@ -155,15 +155,15 @@ static void handle_map_notify(struct wl_listener *listener, void *data) { | |||
155 | &sway_surface->view->unmanaged_view_link); | 155 | &sway_surface->view->unmanaged_view_link); |
156 | } else { | 156 | } else { |
157 | struct sway_view *view = sway_surface->view; | 157 | struct sway_view *view = sway_surface->view; |
158 | sway_container_view_destroy(view->swayc); | 158 | container_view_destroy(view->swayc); |
159 | 159 | ||
160 | struct sway_container *parent = root_container.children->items[0]; | 160 | struct sway_container *parent = root_container.children->items[0]; |
161 | parent = parent->children->items[0]; // workspace | 161 | parent = parent->children->items[0]; // workspace |
162 | 162 | ||
163 | struct sway_container *cont = sway_container_view_create(parent, view); | 163 | struct sway_container *cont = container_view_create(parent, view); |
164 | view->swayc = cont; | 164 | view->swayc = cont; |
165 | 165 | ||
166 | arrange_windows(cont->parent, -1, -1); | 166 | container_arrange_windows(cont->parent, -1, -1); |
167 | sway_input_manager_set_focus(input_manager, cont); | 167 | sway_input_manager_set_focus(input_manager, cont); |
168 | } | 168 | } |
169 | } | 169 | } |
@@ -239,9 +239,9 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) { | |||
239 | 239 | ||
240 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 240 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
241 | struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container); | 241 | struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container); |
242 | struct sway_container *cont = sway_container_view_create(focus, sway_view); | 242 | struct sway_container *cont = container_view_create(focus, sway_view); |
243 | sway_view->swayc = cont; | 243 | sway_view->swayc = cont; |
244 | 244 | ||
245 | arrange_windows(cont->parent, -1, -1); | 245 | container_arrange_windows(cont->parent, -1, -1); |
246 | sway_input_manager_set_focus(input_manager, cont); | 246 | sway_input_manager_set_focus(input_manager, cont); |
247 | } | 247 | } |