diff options
author | emersion <contact@emersion.fr> | 2018-08-19 09:21:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 09:21:55 +0100 |
commit | 2c91afbb34f649fcd4de690be5bedba4d989a7f0 (patch) | |
tree | 681f45a530a1f8d5966161291c3cb482e52edb6e /sway/desktop/output.c | |
parent | Merge pull request #2453 from ianyfan/commands (diff) | |
parent | Replace hacky L_FLOATING container with a list (diff) | |
download | sway-2c91afbb34f649fcd4de690be5bedba4d989a7f0.tar.gz sway-2c91afbb34f649fcd4de690be5bedba4d989a7f0.tar.zst sway-2c91afbb34f649fcd4de690be5bedba4d989a7f0.zip |
Merge pull request #2487 from RyanDwyer/workspace-floating-list
Replace hacky L_FLOATING container with a list
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 1e4f196b..2253eb51 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -316,31 +316,21 @@ static void send_frame_done_container_iterator(struct sway_container *con, | |||
316 | send_frame_done_iterator, data->when); | 316 | send_frame_done_iterator, data->when); |
317 | } | 317 | } |
318 | 318 | ||
319 | static void send_frame_done_container(struct sway_output *output, | ||
320 | struct sway_container *con, struct timespec *when) { | ||
321 | struct send_frame_done_data data = { | ||
322 | .output = output, | ||
323 | .when = when, | ||
324 | }; | ||
325 | output_for_each_container(output->swayc, | ||
326 | send_frame_done_container_iterator, &data); | ||
327 | } | ||
328 | |||
329 | static void send_frame_done(struct sway_output *output, struct timespec *when) { | 319 | static void send_frame_done(struct sway_output *output, struct timespec *when) { |
330 | if (output_has_opaque_overlay_layer_surface(output)) { | 320 | if (output_has_opaque_overlay_layer_surface(output)) { |
331 | goto send_frame_overlay; | 321 | goto send_frame_overlay; |
332 | } | 322 | } |
333 | 323 | ||
324 | struct send_frame_done_data data = { | ||
325 | .output = output, | ||
326 | .when = when, | ||
327 | }; | ||
334 | struct sway_container *workspace = output_get_active_workspace(output); | 328 | struct sway_container *workspace = output_get_active_workspace(output); |
335 | if (workspace->current.ws_fullscreen) { | 329 | if (workspace->current.ws_fullscreen) { |
336 | if (workspace->current.ws_fullscreen->type == C_VIEW) { | 330 | send_frame_done_container_iterator( |
337 | output_view_for_each_surface(output, | 331 | workspace->current.ws_fullscreen, &data); |
338 | workspace->current.ws_fullscreen->sway_view, | 332 | container_for_each_child(workspace->current.ws_fullscreen, |
339 | send_frame_done_iterator, when); | 333 | send_frame_done_container_iterator, &data); |
340 | } else { | ||
341 | send_frame_done_container(output, workspace->current.ws_fullscreen, | ||
342 | when); | ||
343 | } | ||
344 | #ifdef HAVE_XWAYLAND | 334 | #ifdef HAVE_XWAYLAND |
345 | send_frame_done_unmanaged(output, | 335 | send_frame_done_unmanaged(output, |
346 | &root_container.sway_root->xwayland_unmanaged, when); | 336 | &root_container.sway_root->xwayland_unmanaged, when); |
@@ -351,9 +341,8 @@ static void send_frame_done(struct sway_output *output, struct timespec *when) { | |||
351 | send_frame_done_layer(output, | 341 | send_frame_done_layer(output, |
352 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM], when); | 342 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM], when); |
353 | 343 | ||
354 | send_frame_done_container(output, workspace, when); | 344 | workspace_for_each_container(workspace, |
355 | send_frame_done_container(output, workspace->sway_workspace->floating, | 345 | send_frame_done_container_iterator, &data); |
356 | when); | ||
357 | 346 | ||
358 | #ifdef HAVE_XWAYLAND | 347 | #ifdef HAVE_XWAYLAND |
359 | send_frame_done_unmanaged(output, | 348 | send_frame_done_unmanaged(output, |