/* * SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez * SPDX-FileCopyrightText: 2018 Drew DeVault * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "qwaylandlayershellintegration_p.h" #include "qwaylandlayershell_p.h" #include #include #include namespace LayerShellQt { QWaylandLayerShellIntegration::QWaylandLayerShellIntegration() : m_layerShell(Q_NULLPTR) { } bool QWaylandLayerShellIntegration::initialize(QtWaylandClient::QWaylandDisplay *display) { QWaylandShellIntegration::initialize(display); display->addRegistryListener(registryLayer, this); return m_layerShell != nullptr; } QtWaylandClient::QWaylandShellSurface *QWaylandLayerShellIntegration:: createShellSurface(QtWaylandClient::QWaylandWindow *window) { return m_layerShell->createLayerSurface(window); } void QWaylandLayerShellIntegration::registryLayer(void *data, struct wl_registry *registry, uint32_t id, const QString &interface, uint32_t version) { QWaylandLayerShellIntegration *shell = static_cast(data); if (interface == QStringLiteral("zwlr_layer_shell_v1")) shell->m_layerShell = new QWaylandLayerShell( new QtWayland::zwlr_layer_shell_v1(registry, id, version)); } } //#include "qwaylandlayershellintegration.moc"