summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandscreen.cpp')
-rw-r--r--src/client/qwaylandscreen.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index ea109c8f5..3faef3f25 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -22,6 +22,11 @@ QWaylandXdgOutputManagerV1::QWaylandXdgOutputManagerV1(QWaylandDisplay* display,
{
}
+QWaylandXdgOutputManagerV1::~QWaylandXdgOutputManagerV1()
+{
+ destroy();
+}
+
QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id)
: QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 3))
, m_outputId(id)
@@ -44,8 +49,10 @@ QWaylandScreen::~QWaylandScreen()
{
if (zxdg_output_v1::isInitialized())
zxdg_output_v1::destroy();
- if (wl_output::isInitialized() && wl_output::version() >= WL_OUTPUT_RELEASE_SINCE_VERSION)
+ if (wl_output::version() >= WL_OUTPUT_RELEASE_SINCE_VERSION)
wl_output::release();
+ else
+ wl_output_destroy(wl_output::object());
}
uint QWaylandScreen::requiredEvents() const