summaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c14
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
542struct sway_container *view_unmap(struct sway_view *view) { 542void 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
558void view_update_position(struct sway_view *view, double lx, double ly) { 564void view_update_position(struct sway_view *view, double lx, double ly) {