From 832ebc896655cb5ca7689559d4e42b426d764e71 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 7 Oct 2018 20:40:05 +1000 Subject: 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. --- include/sway/tree/view.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/sway/tree') diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 028be536..eb1e98e1 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -49,6 +49,8 @@ struct sway_view_impl { wlr_surface_iterator_func_t iterator, void *user_data); void (*for_each_popup)(struct sway_view *view, wlr_surface_iterator_func_t iterator, void *user_data); + bool (*is_transient_for)(struct sway_view *child, + struct sway_view *ancestor); void (*close)(struct sway_view *view); void (*close_popups)(struct sway_view *view); void (*destroy)(struct sway_view *view); @@ -396,4 +398,6 @@ void view_remove_saved_buffer(struct sway_view *view); void view_save_buffer(struct sway_view *view); +bool view_is_transient_for(struct sway_view *child, struct sway_view *ancestor); + #endif -- cgit v1.2.3-54-g00ecf