summaryrefslogtreecommitdiffstats
path: root/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-01-11 11:22:23 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-01-14 08:08:32 +0000
commit312c74a4aa7124b5125c2ca6165805c50e23e828 (patch)
treef145b22e72b4eb35b85e84e5a9883a78a5071035 /src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
parent8a638d510db90364cef990e770b84f372bde9f6b (diff)
Client decorations: Show menu on right click
[ChangeLog][QPA plugin] A window menu is now shown when the window decorations are right-clicked (if supported by the compositor). Change-Id: I13bf0c8cd91a6e5a3b44e47114dfdc2ff0e97f3a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp')
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
index e12573ad0..01122769e 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
@@ -251,6 +251,16 @@ bool QWaylandXdgSurfaceV6::move(QWaylandInputDevice *inputDevice)
return false;
}
+bool QWaylandXdgSurfaceV6::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 QWaylandXdgSurfaceV6::setTitle(const QString &title)
{
if (m_toplevel)