diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-05-09 16:07:36 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2019-05-10 12:47:30 +0000 |
commit | 14d37a53a674d7dbef32e718ae391e265fad5fac (patch) | |
tree | b15dd0638e44dc92b5a39b62f15caf21d51b7d97 | |
parent | 5ec182df699041699f514d164a161c299fde5d19 (diff) | |
download | qtwayland-14d37a53a674d7dbef32e718ae391e265fad5fac.tar.gz |
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.cpp | 20 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.h | 1 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellv6.cpp | 20 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellv6.h | 1 |
4 files changed, 42 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp index eb7b958b..f06fd793 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 774dd228..f45038eb 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 f971fe5b..d1ee45da 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 b9c47c57..64c82306 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(); |