screencast: Switch to new outputScreencastRequested() signal

This commit is contained in:
Vlad Zahorodnii 2020-09-02 17:38:56 +03:00
parent 790ddc0909
commit b3f3248543
2 changed files with 3 additions and 9 deletions

View file

@ -128,16 +128,10 @@ void ScreencastManager::streamWindow(KWaylandServer::ScreencastStreamInterface *
} }
void ScreencastManager::streamOutput(KWaylandServer::ScreencastStreamInterface *waylandStream, void ScreencastManager::streamOutput(KWaylandServer::ScreencastStreamInterface *waylandStream,
::wl_resource *outputResource, KWaylandServer::OutputInterface *output,
KWaylandServer::ScreencastInterface::CursorMode mode) KWaylandServer::ScreencastInterface::CursorMode mode)
{ {
auto outputIface = KWaylandServer::OutputInterface::get(outputResource); AbstractWaylandOutput *streamOutput = waylandServer()->findOutput(output);
if (!outputIface) {
waylandStream->sendFailed(i18n("Invalid output"));
return;
}
AbstractWaylandOutput *streamOutput = waylandServer()->findOutput(outputIface);
if (!streamOutput) { if (!streamOutput) {
waylandStream->sendFailed(i18n("Could not find output")); waylandStream->sendFailed(i18n("Could not find output"));

View file

@ -24,7 +24,7 @@ public:
void streamWindow(KWaylandServer::ScreencastStreamInterface *stream, const QString &winid); void streamWindow(KWaylandServer::ScreencastStreamInterface *stream, const QString &winid);
void streamOutput(KWaylandServer::ScreencastStreamInterface *stream, void streamOutput(KWaylandServer::ScreencastStreamInterface *stream,
::wl_resource *outputResource, KWaylandServer::OutputInterface *output,
KWaylandServer::ScreencastInterface::CursorMode mode); KWaylandServer::ScreencastInterface::CursorMode mode);
private: private: