aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-07 20:40:05 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-08 22:49:59 +1000
commit832ebc896655cb5ca7689559d4e42b426d764e71 (patch)
tree1a3bc3ff7fb13d7ed5e86ad67a05739d4c4a1de3 /sway/desktop/render.c
parentMerge pull request #2791 from RyanDwyer/status-command-optional (diff)
downloadsway-832ebc896655cb5ca7689559d4e42b426d764e71.tar.gz
sway-832ebc896655cb5ca7689559d4e42b426d764e71.tar.zst
sway-832ebc896655cb5ca7689559d4e42b426d764e71.zip
Implement popup_during_fullscreen
This introduces a new view_impl function: is_transient_for. Similar to container_has_ancestor but works using the surface parents rather than the tree. This patch modifies view_is_visible, container_at and so on to allow transient views to function normally when they're in front of a fullscreen view.
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index c8b08a58..c2a0d29f 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -961,6 +961,17 @@ void output_render(struct sway_output *output, struct timespec *when,
961 render_container(output, damage, fullscreen_con, 961 render_container(output, damage, fullscreen_con,
962 fullscreen_con->current.focused); 962 fullscreen_con->current.focused);
963 } 963 }
964
965 if (config->popup_during_fullscreen == POPUP_SMART &&
966 fullscreen_con->view) {
967 for (int i = 0; i < workspace->floating->length; ++i) {
968 struct sway_container *floater = workspace->floating->items[i];
969 if (floater->view && view_is_transient_for(
970 floater->view, fullscreen_con->view)) {
971 render_floating_container(output, damage, floater);
972 }
973 }
974 }
964#ifdef HAVE_XWAYLAND 975#ifdef HAVE_XWAYLAND
965 render_unmanaged(output, damage, &root->xwayland_unmanaged); 976 render_unmanaged(output, damage, &root->xwayland_unmanaged);
966#endif 977#endif