Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:significant reason:default
4
5
#
include
"qwaylandqtshellintegration_p.h"
6
7
#
include
<
QtWaylandCompositor
/
QWaylandCompositor
>
8
#
include
<
QtWaylandCompositor
/
QWaylandQuickShellSurfaceItem
>
9
#
include
<
QtWaylandCompositor
/
QWaylandSeat
>
10
#
include
"qwaylandqtshell.h"
11
12
QT_BEGIN_NAMESPACE
13
14
namespace
QtWayland
{
15
16
QtShellIntegration
::QtShellIntegration(QWaylandQuickShellSurfaceItem *item)
17
: QWaylandQuickShellIntegration(item)
18
, m_item(item)
19
, m_shellSurface(qobject_cast<QWaylandQtShellSurface *>(item->shellSurface()))
20
{
21
m_item->setSurface(m_shellSurface->surface());
22
connect(m_shellSurface, &QWaylandQtShellSurface::destroyed,
23
this
, &QtShellIntegration::handleQtShellSurfaceDestroyed);
24
}
25
26
QtShellIntegration
::~
QtShellIntegration
()
27
{
28
// When m_shellSurface is null, handleQtShellSurfaceDestroyed() already ran, which means that the
29
// QWaylandQtShellSurface was destroyed before the wl_surface. If so, the surface is left attached
30
// to the QWaylandQuickItem, so the wl_surface destruction path can still emit surfaceDestroyed.
31
if
(m_shellSurface)
32
m_item->setSurface(
nullptr
);
33
}
34
35
void
QtShellIntegration
::handleQtShellSurfaceDestroyed()
36
{
37
m_shellSurface =
nullptr
;
38
}
39
40
}
41
42
QT_END_NAMESPACE
43
44
#
include
"moc_qwaylandqtshellintegration_p.cpp"
QtWayland::QtShellIntegration
Definition
qwaylandqtshellintegration_p.h:28
QtWayland::QtShellIntegration::~QtShellIntegration
~QtShellIntegration() override
Definition
qwaylandqtshellintegration.cpp:26
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtWayland
Definition
qwaylanddisplay_p.h:54
qtwayland
src
imports
compositor-extensions
qtshell
qwaylandqtshellintegration.cpp
Generated on
for Qt by
1.18.0