File indexing completed on 2024-04-14 15:37:30

0001 /*
0002  *   SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
0003  *   SPDX-FileCopyrightText: 2018 Drew DeVault <sir@cmpwn.com>
0004  *
0005  *   SPDX-License-Identifier: LGPL-3.0-or-later
0006  */
0007 
0008 #include "qwaylandlayershell_p.h"
0009 #include "qwaylandlayersurface_p.h"
0010 
0011 namespace LayerShellQt
0012 {
0013 QWaylandLayerShell::QWaylandLayerShell(::wl_registry *registry, uint32_t id, uint32_t version)
0014     : QtWayland::zwlr_layer_shell_v1(registry, id, version)
0015 {
0016 }
0017 
0018 QWaylandLayerShell::~QWaylandLayerShell()
0019 {
0020     if (zwlr_layer_shell_v1_get_version(object()) >= ZWLR_LAYER_SHELL_V1_DESTROY_SINCE_VERSION)
0021         zwlr_layer_shell_v1_destroy(object());
0022 }
0023 
0024 QWaylandLayerSurface *QWaylandLayerShell::createLayerSurface(QtWaylandClient::QWaylandWindow *window)
0025 {
0026     return new QWaylandLayerSurface(this, window);
0027 }
0028 
0029 }