kwin/src/wayland/display_p.h
Vlad Zahorodnii 82c6538ee4 wayland: Refactor ClientBuffer
ClientBufferIntegration was introduced to work around the fact that some
client buffers are not created by us.

In addition to that, DisplayPrivate::registerClientBuffer() was
introduced to register client buffers created by us.

This change get rids of the ClientBufferIntegration type and further
simplifies the ClientBuffer type to make wayland-specific client buffer
code less messier.
2023-04-30 15:39:10 +03:00

47 lines
1.1 KiB
C++

/*
SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
SPDX-FileCopyrightText: 2018 David Edmundson <davidedmundson@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#pragma once
#include <wayland-server-core.h>
#include <QList>
#include <QSocketNotifier>
#include <QString>
#include <QVector>
struct wl_resource;
namespace KWaylandServer
{
class ClientConnection;
class Display;
class OutputInterface;
class OutputDeviceV2Interface;
class SeatInterface;
class DisplayPrivate
{
public:
static DisplayPrivate *get(Display *display);
DisplayPrivate(Display *q);
void registerSocketName(const QString &socketName);
Display *q;
QSocketNotifier *socketNotifier = nullptr;
wl_display *display = nullptr;
wl_event_loop *loop = nullptr;
bool running = false;
QList<OutputInterface *> outputs;
QList<OutputDeviceV2Interface *> outputdevicesV2;
QVector<SeatInterface *> seats;
QVector<ClientConnection *> clients;
QStringList socketNames;
};
} // namespace KWaylandServer