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.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 4759c998..2c8839f5 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -561,14 +561,26 @@ static bool should_focus(struct sway_view *view) {
561} 561}
562 562
563void view_map(struct sway_view *view, struct wlr_surface *wlr_surface, 563void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
564 bool fullscreen, bool decoration) { 564 bool fullscreen, struct wlr_output *fullscreen_output,
565 bool decoration) {
565 if (!sway_assert(view->surface == NULL, "cannot map mapped view")) { 566 if (!sway_assert(view->surface == NULL, "cannot map mapped view")) {
566 return; 567 return;
567 } 568 }
568 view->surface = wlr_surface; 569 view->surface = wlr_surface;
569 570
571 // If there is a request to be opened fullscreen on a specific output, try
572 // to honor that request. Otherwise, fallback to assigns, pid mappings,
573 // focused workspace, etc
574 struct sway_workspace *ws = NULL;
575 if (fullscreen_output && fullscreen_output->data) {
576 struct sway_output *output = fullscreen_output->data;
577 ws = output_get_active_workspace(output);
578 }
579 if (!ws) {
580 ws = select_workspace(view);
581 }
582
570 struct sway_seat *seat = input_manager_current_seat(); 583 struct sway_seat *seat = input_manager_current_seat();
571 struct sway_workspace *ws = select_workspace(view);
572 struct sway_node *node = seat_get_focus_inactive(seat, &ws->node); 584 struct sway_node *node = seat_get_focus_inactive(seat, &ws->node);
573 struct sway_container *target_sibling = node->type == N_CONTAINER ? 585 struct sway_container *target_sibling = node->type == N_CONTAINER ?
574 node->sway_container : NULL; 586 node->sway_container : NULL;