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
qwaylandqtshellintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 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/QWaylandQuickShellSurfaceItem>
8#include <QtWaylandCompositor/QWaylandSeat>
10
12
13namespace QtWayland {
14
15QtShellIntegration::QtShellIntegration(QWaylandQuickShellSurfaceItem *item)
16 : QWaylandQuickShellIntegration(item)
17 , m_item(item)
18 , m_shellSurface(qobject_cast<QWaylandQtShellSurface *>(item->shellSurface()))
19{
20 m_item->setSurface(m_shellSurface->surface());
21 connect(m_shellSurface, &QWaylandQtShellSurface::destroyed,
22 this, &QtShellIntegration::handleQtShellSurfaceDestroyed);
23}
24
26{
27 m_item->setSurface(nullptr);
28}
29
30void QtShellIntegration::handleQtShellSurfaceDestroyed()
31{
32 m_shellSurface = nullptr;
33}
34
35}
36
37QT_END_NAMESPACE
38
39#include "moc_qwaylandqtshellintegration_p.cpp"