File indexing completed on 2023-12-03 12:24:54

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 "qwaylandlayershellintegration_p.h"
0009 #include "qwaylandlayersurface_p.h"
0010 
0011 #include <QtWaylandClient/private/qwaylanddisplay_p.h>
0012 #include <QtWaylandClient/private/qwaylandwindow_p.h>
0013 
0014 namespace LayerShellQt
0015 {
0016 QWaylandLayerShellIntegration::QWaylandLayerShellIntegration()
0017     : QWaylandShellIntegrationTemplate<QWaylandLayerShellIntegration>(4)
0018 {
0019 }
0020 
0021 QWaylandLayerShellIntegration::~QWaylandLayerShellIntegration()
0022 {
0023     if (object() && zwlr_layer_shell_v1_get_version(object()) >= ZWLR_LAYER_SHELL_V1_DESTROY_SINCE_VERSION) {
0024         zwlr_layer_shell_v1_destroy(object());
0025     }
0026 }
0027 
0028 QtWaylandClient::QWaylandShellSurface *QWaylandLayerShellIntegration::createShellSurface(QtWaylandClient::QWaylandWindow *window)
0029 {
0030     return new QWaylandLayerSurface(this, window);
0031 }
0032 
0033 
0034 }