Commit 5a73f4a3 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Vlad Zahorodnii
Browse files

screencast: Move creation of the global to manager

We want to turn screencasting into a plugin eventually.
parent 4eda4d2b
......@@ -27,6 +27,7 @@
#include "plugins/scenes/opengl/scene_opengl.h"
#include "pipewirestream.h"
#include <KWaylandServer/display.h>
#include <KWaylandServer/output_interface.h>
#include <KLocalizedString>
#include <abstract_client.h>
......@@ -37,9 +38,12 @@ using namespace KWin;
ScreencastManager::ScreencastManager(QObject *parent)
: QObject(parent)
, m_screencast(waylandServer()->display()->createScreencastInterface(this))
{
connect(waylandServer()->screencast(), &KWaylandServer::ScreencastInterface::windowScreencastRequested, this, &ScreencastManager::streamWindow);
connect(waylandServer()->screencast(), &KWaylandServer::ScreencastInterface::outputScreencastRequested, this, &ScreencastManager::streamOutput);
connect(m_screencast, &KWaylandServer::ScreencastInterface::windowScreencastRequested,
this, &ScreencastManager::streamWindow);
connect(m_screencast, &KWaylandServer::ScreencastInterface::outputScreencastRequested,
this, &ScreencastManager::streamOutput);
}
class EGLFence : public QObject
{
......
......@@ -45,5 +45,7 @@ public:
private:
void integrateStreams(KWaylandServer::ScreencastStreamInterface *waylandStream, PipeWireStream *pipewireStream);
KWaylandServer::ScreencastInterface *m_screencast;
};
......@@ -458,10 +458,6 @@ bool WaylandServer::init(const QByteArray &socketName, InitializationFlags flags
m_keyState = m_display->createKeyStateInterface(m_display);
m_keyState->create();
#ifdef PipeWire_FOUND
m_screencast = m_display->createScreencastInterface(m_display);
#endif
return true;
}
......
......@@ -69,7 +69,6 @@ class LinuxDmabufUnstableV1Buffer;
class TabletManagerInterface;
class KeyboardShortcutsInhibitManagerV1Interface;
class XdgDecorationManagerV1Interface;
class ScreencastInterface;
}
......@@ -128,9 +127,6 @@ public:
{
return m_windowManagement;
}
KWaylandServer::ScreencastInterface *screencast() {
return m_screencast;
}
KWaylandServer::ServerSideDecorationManagerInterface *decorationManager() const {
return m_decorationManager;
}
......@@ -285,7 +281,6 @@ private:
KWaylandServer::LinuxDmabufUnstableV1Interface *m_linuxDmabuf = nullptr;
KWaylandServer::KeyboardShortcutsInhibitManagerV1Interface *m_keyboardShortcutsInhibitManager = nullptr;
QSet<KWaylandServer::LinuxDmabufUnstableV1Buffer*> m_linuxDmabufBuffers;
KWaylandServer::ScreencastInterface *m_screencast = nullptr;
struct {
KWaylandServer::ClientConnection *client = nullptr;
QMetaObject::Connection destroyConnection;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment