diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandshellsurface_p.h | 3 | ||||
-rw-r--r-- | src/client/qwaylandwindow.cpp | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/client/qwaylandshellsurface_p.h b/src/client/qwaylandshellsurface_p.h index 51116c52..6499a2bb 100644 --- a/src/client/qwaylandshellsurface_p.h +++ b/src/client/qwaylandshellsurface_p.h @@ -84,6 +84,9 @@ public: virtual std::any surfaceRole() const { return std::any(); }; + virtual void attachPopup(QWaylandShellSurface *popup) { Q_UNUSED(popup); } + virtual void detachPopup(QWaylandShellSurface *popup) { Q_UNUSED(popup); } + protected: void resizeFromApplyConfigure(const QSize &sizeWithMargins, const QPoint &offset = {0, 0}); void repositionFromApplyConfigure(const QPoint &position); diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 74db519f..c48c9ddd 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -1635,11 +1635,15 @@ void QWaylandWindow::setXdgActivationToken(const QString &token) void QWaylandWindow::addChildPopup(QWaylandWindow *child) { + if (mShellSurface) + mShellSurface->attachPopup(child->shellSurface()); mChildPopups.append(child); } void QWaylandWindow::removeChildPopup(QWaylandWindow *child) { + if (mShellSurface) + mShellSurface->detachPopup(child->shellSurface()); mChildPopups.removeAll(child); } |