File indexing completed on 2024-04-28 05:31:21
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 #include "qwaylandxdgactivationv1_p.h" 0011 0012 #include <QtWaylandClient/private/qwaylanddisplay_p.h> 0013 #include <QtWaylandClient/private/qwaylandwindow_p.h> 0014 0015 namespace LayerShellQt 0016 { 0017 QWaylandLayerShellIntegration::QWaylandLayerShellIntegration() 0018 : QWaylandShellIntegrationTemplate<QWaylandLayerShellIntegration>(5) 0019 , m_xdgActivation(new QWaylandXdgActivationV1) 0020 { 0021 } 0022 0023 QWaylandLayerShellIntegration::~QWaylandLayerShellIntegration() 0024 { 0025 if (object() && zwlr_layer_shell_v1_get_version(object()) >= ZWLR_LAYER_SHELL_V1_DESTROY_SINCE_VERSION) { 0026 zwlr_layer_shell_v1_destroy(object()); 0027 } 0028 } 0029 0030 QtWaylandClient::QWaylandShellSurface *QWaylandLayerShellIntegration::createShellSurface(QtWaylandClient::QWaylandWindow *window) 0031 { 0032 return new QWaylandLayerSurface(this, window); 0033 } 0034 0035 0036 }