Introduce krfb-virtualmonitor

It implements a KWin protocol that is oriented towards serving a virtual
display specifically.
It requests KWin a stream that will act as a monitor that we can feed
into remote clients.
This commit is contained in:
Aleix Pol
2021-10-14 16:02:04 +02:00
committed by Aleix Pol Gonzalez
parent 608762c7ac
commit 4707bde236
11 changed files with 497 additions and 4 deletions

View File

@@ -41,6 +41,13 @@ FrameBuffer *PWFrameBufferPlugin::frameBuffer(WId id, const QVariantMap &args)
//NOTE WId is irrelevant in Wayland
auto pwfb = new PWFrameBuffer(id);
if (args.contains(QLatin1String("name"))) {
pwfb->startVirtualMonitor(args[QStringLiteral("name")].toString(), args[QStringLiteral("resolution")].toSize(), args[QStringLiteral("scale")].toDouble());
} else {
// D-Bus is most important in XDG-Desktop-Portals init chain, no toys for us if something is wrong with XDP
// PipeWire connectivity is initialized after D-Bus session is started
pwfb->initDBus();
}
// sanity check for dbus/wayland/pipewire errors
if (!pwfb->isValid()) {