Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandivisurfaceintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
5
6#include <QtWaylandCompositor/QWaylandCompositor>
7#include <QtWaylandCompositor/QWaylandIviSurface>
8#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
9#include <QtWaylandCompositor/QWaylandSeat>
10
12
13namespace QtWayland {
14
15IviSurfaceIntegration::IviSurfaceIntegration(QWaylandQuickShellSurfaceItem *item)
16 : QWaylandQuickShellIntegration(item)
17 , m_item(item)
18 , m_shellSurface(qobject_cast<QWaylandIviSurface *>(item->shellSurface()))
19{
20 m_item->setSurface(m_shellSurface->surface());
21 connect(m_shellSurface, &QWaylandIviSurface::destroyed, this, &IviSurfaceIntegration::handleIviSurfaceDestroyed);
22}
23
25{
26 m_item->setSurface(nullptr);
27}
28
29void IviSurfaceIntegration::handleIviSurfaceDestroyed()
30{
31 m_shellSurface = nullptr;
32}
33
34}
35
36QT_END_NAMESPACE
37
38#include "moc_qwaylandivisurfaceintegration_p.cpp"