diff options
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/xdg_shell.c | 2 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index b5dcfb0f..152bd26f 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -216,7 +216,7 @@ static bool is_transient_for(struct sway_view *child, return false; } struct wlr_xdg_surface *surface = child->wlr_xdg_surface; - while (surface) { + while (surface && surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL) { if (surface->toplevel->parent == ancestor->wlr_xdg_surface) { return true; } diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index a7ea163f..3eed54ab 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c @@ -213,7 +213,7 @@ static bool is_transient_for(struct sway_view *child, return false; } struct wlr_xdg_surface_v6 *surface = child->wlr_xdg_surface_v6; - while (surface) { + while (surface && surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL) { if (surface->toplevel->parent == ancestor->wlr_xdg_surface_v6) { return true; } |