From ea49c2e19db60dc41ce8e7525f6473b84fec48f6 Mon Sep 17 00:00:00 2001 From: David Redondo Date: Wed, 8 Dec 2021 11:53:00 +0100 Subject: [PATCH] Handle the transientParent of a window having another kind of surface Useful for the current work of allowing multiple shells in one process. Change-Id: I68424687df9069fd4339f2764649db1df70a6c9a Reviewed-by: David Edmundson --- .../plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index ad533606613..547631fd57e 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -258,7 +258,7 @@ QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *shell, ::xdg_surface *s } else { setToplevel(); if (transientParent) { - auto parentXdgSurface = static_cast(transientParent->shellSurface()); + auto parentXdgSurface = qobject_cast(transientParent->shellSurface()); if (parentXdgSurface) m_toplevel->set_parent(parentXdgSurface->m_toplevel->object()); }