File indexing completed on 2024-05-19 16:35:16

0001 /*
0002     SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "clientbufferintegration.h"
0008 #include "display.h"
0009 #include "display_p.h"
0010 
0011 namespace KWaylandServer
0012 {
0013 ClientBufferIntegration::ClientBufferIntegration(Display *display)
0014     : QObject(display)
0015     , m_display(display)
0016 {
0017     DisplayPrivate *displayPrivate = DisplayPrivate::get(display);
0018     displayPrivate->bufferIntegrations.append(this);
0019 }
0020 
0021 ClientBufferIntegration::~ClientBufferIntegration()
0022 {
0023     if (m_display) {
0024         DisplayPrivate *displayPrivate = DisplayPrivate::get(m_display);
0025         displayPrivate->bufferIntegrations.removeOne(this);
0026     }
0027 }
0028 
0029 Display *ClientBufferIntegration::display() const
0030 {
0031     return m_display;
0032 }
0033 
0034 ClientBuffer *ClientBufferIntegration::createBuffer(wl_resource *resource)
0035 {
0036     return nullptr;
0037 }
0038 
0039 } // namespace KWaylandServer