diff options
author | Brian Ashworth <RedSoxFan@users.noreply.github.com> | 2018-10-08 15:28:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 15:28:09 -0400 |
commit | a999269e1cf8eeb423547a0c8ab3420f27628168 (patch) | |
tree | 3572a9e1bff58710c22638d85ce1206af3999d94 /sway/desktop/xwayland.c | |
parent | a03955f9368cfa1c190e4194eed8437dce22eb77 (diff) | |
parent | 3f328b62768d7801f0544b31ab8f9dde3014fd1d (diff) |
Merge pull request #2782 from RyanDwyer/popup-during-fullscreen
Implement popup_during_fullscreen
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 4c710f7e..ebf2131e 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -15,6 +15,7 @@ #include "sway/tree/arrange.h" #include "sway/tree/container.h" #include "sway/tree/view.h" +#include "sway/tree/workspace.h" static const char *atom_map[ATOM_LAST] = { "_NET_WM_WINDOW_TYPE_NORMAL", @@ -253,6 +254,21 @@ static void handle_set_decorations(struct wl_listener *listener, void *data) { view_update_csd_from_client(view, csd); } +static bool is_transient_for(struct sway_view *child, + struct sway_view *ancestor) { + if (xwayland_view_from_view(child) == NULL) { + return false; + } + struct wlr_xwayland_surface *surface = child->wlr_xwayland_surface; + while (surface) { + if (surface->parent == ancestor->wlr_xwayland_surface) { + return true; + } + surface = surface->parent; + } + return false; +} + static void _close(struct sway_view *view) { if (xwayland_view_from_view(view) == NULL) { return; @@ -276,6 +292,7 @@ static const struct sway_view_impl view_impl = { .set_tiled = set_tiled, .set_fullscreen = set_fullscreen, .wants_floating = wants_floating, + .is_transient_for = is_transient_for, .close = _close, .destroy = destroy, }; |