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 ae73a687..1f00452d 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -576,6 +576,16 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { | |||
576 | view_set_tiled(view, true); | 576 | view_set_tiled(view, true); |
577 | } | 577 | } |
578 | 578 | ||
579 | if (config->popup_during_fullscreen == POPUP_LEAVE && | ||
580 | view->container->workspace && | ||
581 | view->container->workspace->fullscreen && | ||
582 | view->container->workspace->fullscreen->view) { | ||
583 | struct sway_container *fs = view->container->workspace->fullscreen; | ||
584 | if (view_is_transient_for(view, fs->view)) { | ||
585 | container_set_fullscreen(fs, false); | ||
586 | } | ||
587 | } | ||
588 | |||
579 | if (should_focus(view)) { | 589 | if (should_focus(view)) { |
580 | input_manager_set_focus(input_manager, &view->container->node); | 590 | input_manager_set_focus(input_manager, &view->container->node); |
581 | } | 591 | } |
@@ -1080,7 +1090,12 @@ bool view_is_visible(struct sway_view *view) { | |||
1080 | // Check view isn't hidden by another fullscreen view | 1090 | // Check view isn't hidden by another fullscreen view |
1081 | if (workspace->fullscreen && | 1091 | if (workspace->fullscreen && |
1082 | !container_is_fullscreen_or_child(view->container)) { | 1092 | !container_is_fullscreen_or_child(view->container)) { |
1083 | return false; | 1093 | // However, if we're transient for the fullscreen view and we allow |
1094 | // "popups" during fullscreen then it might be visible | ||
1095 | if (!container_is_transient_for(view->container, | ||
1096 | workspace->fullscreen)) { | ||
1097 | return false; | ||
1098 | } | ||
1084 | } | 1099 | } |
1085 | return true; | 1100 | return true; |
1086 | } | 1101 | } |
@@ -1133,3 +1148,9 @@ void view_save_buffer(struct sway_view *view) { | |||
1133 | view->saved_buffer_height = view->surface->current.height; | 1148 | view->saved_buffer_height = view->surface->current.height; |
1134 | } | 1149 | } |
1135 | } | 1150 | } |
1151 | |||
1152 | bool view_is_transient_for(struct sway_view *child, | ||
1153 | struct sway_view *ancestor) { | ||
1154 | return child->impl->is_transient_for && | ||
1155 | child->impl->is_transient_for(child, ancestor); | ||
1156 | } | ||