diff options
Diffstat (limited to 'src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp')
-rw-r--r-- | src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp index 91f9d7771..64d895613 100644 --- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp +++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp @@ -112,7 +112,14 @@ void QWaylandQuickShellSurfaceItem::setShellSurface(QWaylandShellSurface *shellS d->m_shellSurface = shellSurface; - d->m_shellIntegration = shellSurface->createIntegration(this); + if (d->m_shellIntegration) { + delete d->m_shellIntegration; + d->m_shellIntegration = nullptr; + } + + if (shellSurface) + d->m_shellIntegration = shellSurface->createIntegration(this); + emit shellSurfaceChanged(); } |