diff options
Diffstat (limited to 'src/plugins/shellintegration/xdg-shell')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 10 | ||||
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index 8759cb8c9..cabba5b3b 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -279,6 +279,16 @@ bool QWaylandXdgSurface::move(QWaylandInputDevice *inputDevice) return false; } +bool QWaylandXdgSurface::showWindowMenu(QWaylandInputDevice *seat) +{ + if (m_toplevel && m_toplevel->isInitialized()) { + QPoint position = seat->pointerSurfacePosition().toPoint(); + m_toplevel->show_window_menu(seat->wl_seat(), seat->serial(), position.x(), position.y()); + return true; + } + return false; +} + void QWaylandXdgSurface::setTitle(const QString &title) { if (m_toplevel) diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h index 1dc1def23..416feee2c 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h @@ -82,6 +82,7 @@ public: void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override; bool move(QWaylandInputDevice *inputDevice) override; + bool showWindowMenu(QWaylandInputDevice *seat) override; void setTitle(const QString &title) override; void setAppId(const QString &appId) override; void setWindowFlags(Qt::WindowFlags flags) override; |