9f0f452702
This provides kwin greater control over how X11 sockets are created for Xwayland. For example, it can be used to ensure that the DISPLAY remains the same across Xwayland server restarts or launching Xwayland on demand. Even though -listen <fd> option is deprecated, we still pass it because older versions of Xwayland may not have the -listenfd option.
36 lines
624 B
C++
36 lines
624 B
C++
/*
|
|
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QByteArray>
|
|
#include <QString>
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
class XwaylandSocket
|
|
{
|
|
public:
|
|
XwaylandSocket();
|
|
~XwaylandSocket();
|
|
|
|
bool isValid() const;
|
|
int display() const;
|
|
QString name() const;
|
|
|
|
int unixFileDescriptor() const;
|
|
int abstractFileDescriptor() const;
|
|
|
|
private:
|
|
int m_unixFileDescriptor = -1;
|
|
int m_abstractFileDescriptor = -1;
|
|
int m_display = -1;
|
|
QString m_socketFilePath;
|
|
QString m_lockFilePath;
|
|
};
|
|
|
|
} // namespace KWin
|