diff options
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 73ce55ac..97525d6b 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -575,6 +575,16 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { | |||
575 | view_set_tiled(view, true); | 575 | view_set_tiled(view, true); |
576 | } | 576 | } |
577 | 577 | ||
578 | if (config->popup_during_fullscreen == POPUP_LEAVE && | ||
579 | view->container->workspace && | ||
580 | view->container->workspace->fullscreen && | ||
581 | view->container->workspace->fullscreen->view) { | ||
582 | struct sway_container *fs = view->container->workspace->fullscreen; | ||
583 | if (view_is_transient_for(view, fs->view)) { | ||
584 | container_set_fullscreen(fs, false); | ||
585 | } | ||
586 | } | ||
587 | |||
578 | if (should_focus(view)) { | 588 | if (should_focus(view)) { |
579 | input_manager_set_focus(input_manager, &view->container->node); | 589 | input_manager_set_focus(input_manager, &view->container->node); |
580 | } | 590 | } |
@@ -1042,7 +1052,12 @@ bool view_is_visible(struct sway_view *view) { | |||
1042 | // Check view isn't hidden by another fullscreen view | 1052 | // Check view isn't hidden by another fullscreen view |
1043 | if (workspace->fullscreen && | 1053 | if (workspace->fullscreen && |
1044 | !container_is_fullscreen_or_child(view->container)) { | 1054 | !container_is_fullscreen_or_child(view->container)) { |
1045 | return false; | 1055 | // However, if we're transient for the fullscreen view and we allow |
1056 | // "popups" during fullscreen then it might be visible | ||
1057 | if (!container_is_transient_for(view->container, | ||
1058 | workspace->fullscreen)) { | ||
1059 | return false; | ||
1060 | } | ||
1046 | } | 1061 | } |
1047 | return true; | 1062 | return true; |
1048 | } | 1063 | } |
@@ -1095,3 +1110,9 @@ void view_save_buffer(struct sway_view *view) { | |||
1095 | view->saved_buffer_height = view->surface->current.height; | 1110 | view->saved_buffer_height = view->surface->current.height; |
1096 | } | 1111 | } |
1097 | } | 1112 | } |
1113 | |||
1114 | bool view_is_transient_for(struct sway_view *child, | ||
1115 | struct sway_view *ancestor) { | ||
1116 | return child->impl->is_transient_for && | ||
1117 | child->impl->is_transient_for(child, ancestor); | ||
1118 | } | ||