summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-11-16 14:43:20 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2016-11-18 08:22:37 +0000
commit7197be7c0e9d00f98551d12bcc30782503612fe9 (patch)
tree855d22c77a7c2d78dda46a983039e8c092a7b11f
parent5b807802866c8df00cb3340d4f9bcc343be5973a (diff)
Client: Close popups on xdg_popup::popup_done
Change-Id: I6d3b1ec5c22e6d07ed87948074d886cc9aa126ef Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r--src/client/qwaylandxdgpopup.cpp6
-rw-r--r--src/client/qwaylandxdgpopup_p.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/client/qwaylandxdgpopup.cpp b/src/client/qwaylandxdgpopup.cpp
index 57800f17..318f78ac 100644
--- a/src/client/qwaylandxdgpopup.cpp
+++ b/src/client/qwaylandxdgpopup.cpp
@@ -45,6 +45,7 @@ QWaylandXdgPopup::QWaylandXdgPopup(struct ::xdg_popup *popup, QWaylandWindow *wi
: QWaylandShellSurface(window)
, QtWayland::xdg_popup(popup)
, m_extendedWindow(nullptr)
+ , m_window(window)
{
if (window->display()->windowExtension())
m_extendedWindow = new QWaylandExtendedSurface(window);
@@ -62,6 +63,11 @@ void QWaylandXdgPopup::setType(Qt::WindowType type, QWaylandWindow *transientPar
Q_UNUSED(transientParent);
}
+void QWaylandXdgPopup::xdg_popup_popup_done()
+{
+ m_window->window()->close();
+}
+
}
QT_END_NAMESPACE
diff --git a/src/client/qwaylandxdgpopup_p.h b/src/client/qwaylandxdgpopup_p.h
index 64bb4d96..04416dbb 100644
--- a/src/client/qwaylandxdgpopup_p.h
+++ b/src/client/qwaylandxdgpopup_p.h
@@ -70,8 +70,12 @@ public:
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
+protected:
+ void xdg_popup_popup_done() override;
+
private:
QWaylandExtendedSurface *m_extendedWindow;
+ QWaylandWindow *m_window;
};
QT_END_NAMESPACE