diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-27 17:46:03 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-27 17:46:03 +1000 |
commit | be86d3aba602fef7b51fafa8a6e7a39d1e49817f (patch) | |
tree | ba4e3debd236eb39337cd4f59772b2eaf260195f /sway/tree | |
parent | Fix nitpicks (diff) | |
download | sway-be86d3aba602fef7b51fafa8a6e7a39d1e49817f.tar.gz sway-be86d3aba602fef7b51fafa8a6e7a39d1e49817f.tar.zst sway-be86d3aba602fef7b51fafa8a6e7a39d1e49817f.zip |
Remove transaction_add_damage
Instead, damage each container when applying the transaction.
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/arrange.c | 9 | ||||
-rw-r--r-- | sway/tree/view.c | 6 |
2 files changed, 1 insertions, 14 deletions
diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c index cb3f8ba2..582b2891 100644 --- a/sway/tree/arrange.c +++ b/sway/tree/arrange.c | |||
@@ -304,15 +304,6 @@ void arrange_windows(struct sway_container *container, | |||
304 | case C_TYPES: | 304 | case C_TYPES: |
305 | break; | 305 | break; |
306 | } | 306 | } |
307 | // Add damage for whatever container arrange_windows() was called with, | ||
308 | // unless it was called with the special floating container, in which case | ||
309 | // we'll damage the entire output. | ||
310 | if (container->type == C_CONTAINER && container->layout == L_FLOATING) { | ||
311 | struct sway_container *output = container_parent(container, C_OUTPUT); | ||
312 | transaction_add_damage(transaction, container_get_box(output)); | ||
313 | } else { | ||
314 | transaction_add_damage(transaction, container_get_box(container)); | ||
315 | } | ||
316 | add_deleted_containers(transaction); | 307 | add_deleted_containers(transaction); |
317 | } | 308 | } |
318 | 309 | ||
diff --git a/sway/tree/view.c b/sway/tree/view.c index a616af03..68d2a029 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -550,11 +550,7 @@ void view_unmap(struct sway_view *view) { | |||
550 | ws->sway_workspace->fullscreen = NULL; | 550 | ws->sway_workspace->fullscreen = NULL; |
551 | container_destroy(view->swayc); | 551 | container_destroy(view->swayc); |
552 | 552 | ||
553 | struct sway_container *output = ws->parent; | 553 | arrange_and_commit(ws->parent); |
554 | struct sway_transaction *transaction = transaction_create(); | ||
555 | arrange_windows(output, transaction); | ||
556 | transaction_add_damage(transaction, container_get_box(output)); | ||
557 | transaction_commit(transaction); | ||
558 | } else { | 554 | } else { |
559 | struct sway_container *parent = container_destroy(view->swayc); | 555 | struct sway_container *parent = container_destroy(view->swayc); |
560 | arrange_and_commit(parent); | 556 | arrange_and_commit(parent); |