mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-05-28 02:50:21 -04:00
The dynamically allocated QtWayland::zwlr_layer_shell_v1 object in QWaylandLayerShellIntegration::registryLayer() isn't deleted anywhere.
30 lines
809 B
C++
30 lines
809 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
|
|
* SPDX-FileCopyrightText: 2018 Drew DeVault <sir@cmpwn.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-3.0-or-later
|
|
*/
|
|
|
|
#include "qwaylandlayershell_p.h"
|
|
#include "qwaylandlayersurface_p.h"
|
|
|
|
namespace LayerShellQt
|
|
{
|
|
QWaylandLayerShell::QWaylandLayerShell(::wl_registry *registry, uint32_t id, uint32_t version)
|
|
: QtWayland::zwlr_layer_shell_v1(registry, id, version)
|
|
{
|
|
}
|
|
|
|
QWaylandLayerShell::~QWaylandLayerShell()
|
|
{
|
|
if (zwlr_layer_shell_v1_get_version(object()) >= ZWLR_LAYER_SHELL_V1_DESTROY_SINCE_VERSION)
|
|
zwlr_layer_shell_v1_destroy(object());
|
|
}
|
|
|
|
QWaylandLayerSurface *QWaylandLayerShell::createLayerSurface(QtWaylandClient::QWaylandWindow *window)
|
|
{
|
|
return new QWaylandLayerSurface(this, window);
|
|
}
|
|
|
|
}
|