summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-05-09 16:07:36 +0200
committerJohan Helsing <johan.helsing@qt.io>2019-05-10 12:47:30 +0000
commit14d37a53a674d7dbef32e718ae391e265fad5fac (patch)
treeb15dd0638e44dc92b5a39b62f15caf21d51b7d97
parent5ec182df699041699f514d164a161c299fde5d19 (diff)
Add QWaylandXdgPopup::sendPopupDone
...and one for QWaylandXdgPopupV6. We already have similar API for xdg-shell v5. [ChangeLog][Compositor] Added QWaylandXdgPopup::sendPopupDone, which will dismiss a popup. Fixes: QTBUG-75652 Change-Id: I9c36ee38ee606016587ab88d5b015f29594019e1 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.cpp20
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.h1
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6.cpp20
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6.h1
4 files changed, 42 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp
index eb7b958b4..f06fd7934 100644
--- a/src/compositor/extensions/qwaylandxdgshell.cpp
+++ b/src/compositor/extensions/qwaylandxdgshell.cpp
@@ -1871,6 +1871,26 @@ uint QWaylandXdgPopup::sendConfigure(const QRect &geometry)
}
/*!
+ * \qmlmethod void QtWaylandCompositor::XdgPopup::sendPopupDone()
+ * \since 5.14
+ *
+ * Dismiss the popup. According to the \c xdg-shell protocol this should make the
+ * client destroy the popup.
+ */
+
+/*!
+ * \since 5.14
+ *
+ * Dismiss the popup. According to the \c xdg-shell protocol this should make the
+ * client destroy the popup.
+ */
+void QWaylandXdgPopup::sendPopupDone()
+{
+ Q_D(QWaylandXdgPopup);
+ d->send_popup_done();
+}
+
+/*!
* Returns the surface role for the QWaylandPopup.
*/
QWaylandSurfaceRole *QWaylandXdgPopup::role()
diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h
index 774dd2282..f45038eb9 100644
--- a/src/compositor/extensions/qwaylandxdgshell.h
+++ b/src/compositor/extensions/qwaylandxdgshell.h
@@ -260,6 +260,7 @@ public:
QPoint unconstrainedPosition() const;
Q_INVOKABLE uint sendConfigure(const QRect &geometry);
+ Q_REVISION(14) Q_INVOKABLE void sendPopupDone();
static QWaylandSurfaceRole *role();
diff --git a/src/compositor/extensions/qwaylandxdgshellv6.cpp b/src/compositor/extensions/qwaylandxdgshellv6.cpp
index f971fe5b4..d1ee45dab 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv6.cpp
@@ -1802,6 +1802,26 @@ uint QWaylandXdgPopupV6::sendConfigure(const QRect &geometry)
}
/*!
+ * \qmlmethod void QtWaylandCompositor::XdgPopupV6::sendPopupDone()
+ * \since 5.14
+ *
+ * Dismiss the popup. According to the \c xdg-shell-unstable-v6 protocol this should make the
+ * client destroy the popup.
+ */
+
+/*!
+ * \since 5.14
+ *
+ * Dismiss the popup. According to the \c xdg-shell-unstable-v6 protocol this should make the
+ * client destroy the popup.
+ */
+void QWaylandXdgPopupV6::sendPopupDone()
+{
+ Q_D(QWaylandXdgPopupV6);
+ d->send_popup_done();
+}
+
+/*!
* Returns the surface role for the QWaylandPopupV6.
*/
QWaylandSurfaceRole *QWaylandXdgPopupV6::role()
diff --git a/src/compositor/extensions/qwaylandxdgshellv6.h b/src/compositor/extensions/qwaylandxdgshellv6.h
index b9c47c578..64c82306c 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6.h
+++ b/src/compositor/extensions/qwaylandxdgshellv6.h
@@ -246,6 +246,7 @@ public:
QPoint unconstrainedPosition() const;
Q_INVOKABLE uint sendConfigure(const QRect &geometry);
+ Q_REVISION(14) Q_INVOKABLE void sendPopupDone();
static QWaylandSurfaceRole *role();