diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-26 13:15:45 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-26 13:15:45 +1000 |
commit | 7a922c65aab27c5f4282cf15de52d240e5ac8052 (patch) | |
tree | bea2a3dee07631b1da05428b29ec5d1e4c47d871 /sway/tree/view.c | |
parent | Rename progress_queue to transaction_progress_queue (diff) | |
download | sway-7a922c65aab27c5f4282cf15de52d240e5ac8052.tar.gz sway-7a922c65aab27c5f4282cf15de52d240e5ac8052.tar.zst sway-7a922c65aab27c5f4282cf15de52d240e5ac8052.zip |
Damage output when a fullscreen view unmaps
Also moved the arranging into view_unmap to avoid excessive code
duplication.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 2ca0dbbb..5a78112a 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -539,7 +539,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { | |||
539 | view_handle_container_reparent(&view->container_reparent, NULL); | 539 | view_handle_container_reparent(&view->container_reparent, NULL); |
540 | } | 540 | } |
541 | 541 | ||
542 | struct sway_container *view_unmap(struct sway_view *view) { | 542 | void view_unmap(struct sway_view *view) { |
543 | wl_signal_emit(&view->events.unmap, view); | 543 | wl_signal_emit(&view->events.unmap, view); |
544 | 544 | ||
545 | wl_list_remove(&view->surface_new_subsurface.link); | 545 | wl_list_remove(&view->surface_new_subsurface.link); |
@@ -549,10 +549,16 @@ struct sway_container *view_unmap(struct sway_view *view) { | |||
549 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); | 549 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); |
550 | ws->sway_workspace->fullscreen = NULL; | 550 | ws->sway_workspace->fullscreen = NULL; |
551 | container_destroy(view->swayc); | 551 | container_destroy(view->swayc); |
552 | return ws; | ||
553 | } | ||
554 | 552 | ||
555 | return container_destroy(view->swayc); | 553 | struct sway_container *output = 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 { | ||
559 | struct sway_container *parent = container_destroy(view->swayc); | ||
560 | arrange_and_commit(parent); | ||
561 | } | ||
556 | } | 562 | } |
557 | 563 | ||
558 | void view_update_position(struct sway_view *view, double lx, double ly) { | 564 | void view_update_position(struct sway_view *view, double lx, double ly) { |