summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshellv5.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@theqtcompany.com>2016-03-19 15:36:22 +0100
committerJohan Helsing <johan.helsing@qt.io>2016-09-20 08:15:55 +0000
commitb248defd1741cd443dd1e5050fe5143e8650a7c7 (patch)
tree1dc2b7a552ba2051cbf549b510fe6d0b6a5a3979 /src/compositor/extensions/qwaylandxdgshellv5.cpp
parentc7e417e8d552f3a6a10ac12f96119d083f081fc0 (diff)
Compositor API: Add closeAllPopups method to QWaylandWlShell
The WlShell implementation now matches xdg shell. Also adds a convenience method to QWaylandWlShell to get all popups. QWaylandWlShellIntegration and qwindow-compositor uses this new API. Change-Id: Ibfe3323ad7f56d43379785582b9be6801905a485 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshellv5.cpp')
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp
index 284aa8b05..a14f58e05 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp
@@ -531,6 +531,16 @@ void QWaylandXdgShellV5::initialize()
this, &QWaylandXdgShellV5::handleSeatChanged);
}
+QWaylandClient *QWaylandXdgShellV5::popupClient() const
+{
+ Q_D(const QWaylandXdgShellV5);
+ Q_FOREACH (QWaylandXdgPopupV5 *popup, d->m_xdgPopups) {
+ if (popup->surface()->hasContent())
+ return popup->surface()->client();
+ }
+ return nullptr;
+}
+
/*!
* Returns the Wayland interface for the QWaylandXdgShellV5.
*/