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.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index e613ac0b..bdd5f830 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -535,7 +535,8 @@ static bool should_focus(struct sway_view *view) {
535 return len == 0; 535 return len == 0;
536} 536}
537 537
538void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { 538void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
539 bool fullscreen, bool decoration) {
539 if (!sway_assert(view->surface == NULL, "cannot map mapped view")) { 540 if (!sway_assert(view->surface == NULL, "cannot map mapped view")) {
540 return; 541 return;
541 } 542 }
@@ -586,13 +587,28 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {
586 } 587 }
587 } 588 }
588 589
589 if (should_focus(view)) {
590 input_manager_set_focus(input_manager, &view->container->node);
591 }
592
593 view_update_title(view, false); 590 view_update_title(view, false);
594 container_update_representation(view->container); 591 container_update_representation(view->container);
595 view_execute_criteria(view); 592 view_execute_criteria(view);
593
594 if (decoration) {
595 view_update_csd_from_client(view, decoration);
596 }
597
598 if (fullscreen) {
599 container_set_fullscreen(view->container, true);
600 arrange_workspace(view->container->workspace);
601 } else {
602 if (view->container->parent) {
603 arrange_container(view->container->parent);
604 } else if (view->container->workspace) {
605 arrange_workspace(view->container->workspace);
606 }
607 }
608
609 if (should_focus(view)) {
610 input_manager_set_focus(input_manager, &view->container->node);
611 }
596} 612}
597 613
598void view_unmap(struct sway_view *view) { 614void view_unmap(struct sway_view *view) {