blob: 8449df68495e6fae431dc8da6b348b6eec336039 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qwaylandivisurfaceintegration_p.h"
#include <QtWaylandCompositor/QWaylandCompositor>
#include <QtWaylandCompositor/QWaylandIviSurface>
#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
#include <QtWaylandCompositor/QWaylandSeat>
QT_BEGIN_NAMESPACE
namespace QtWayland {
IviSurfaceIntegration::IviSurfaceIntegration(QWaylandQuickShellSurfaceItem *item)
: QWaylandQuickShellIntegration(item)
, m_item(item)
, m_shellSurface(qobject_cast<QWaylandIviSurface *>(item->shellSurface()))
{
m_item->setSurface(m_shellSurface->surface());
connect(m_shellSurface, &QWaylandIviSurface::destroyed, this, &IviSurfaceIntegration::handleIviSurfaceDestroyed);
}
IviSurfaceIntegration::~IviSurfaceIntegration()
{
m_item->setSurface(nullptr);
}
void IviSurfaceIntegration::handleIviSurfaceDestroyed()
{
m_shellSurface = nullptr;
}
}
QT_END_NAMESPACE
#include "moc_qwaylandivisurfaceintegration_p.cpp"
|