Use OutputInterface instead of raw wl_resource objects

Typically, we don't expose wl_output objects as wl_resource objects in
public API. Instead, we use the OutputInterface class for that purpose.
This commit is contained in:
Vlad Zahorodnii 2020-09-02 17:24:49 +03:00
parent 77b7635593
commit c3b9d76d33
2 changed files with 4 additions and 3 deletions

View file

@ -6,6 +6,8 @@
#include "screencast_interface.h"
#include "display.h"
#include "output_interface.h"
#include <QDebug>
#include "qwayland-server-zkde-screencast-unstable-v1.h"
@ -86,7 +88,7 @@ public:
void zkde_screencast_unstable_v1_stream_output(Resource *resource, uint32_t streamid, struct ::wl_resource *output, uint32_t pointer) override
{
Q_EMIT q->outputScreencastRequested(createStream(resource, streamid), output, ScreencastInterface::CursorMode(pointer));
Q_EMIT q->outputScreencastRequested(createStream(resource, streamid), OutputInterface::get(output), ScreencastInterface::CursorMode(pointer));
}
void zkde_screencast_unstable_v1_stream_window(Resource *resource, uint32_t streamid, const QString &uuid, uint32_t pointer) override

View file

@ -9,7 +9,6 @@
#include <QObject>
#include <QScopedPointer>
#include <KWaylandServer/kwaylandserver_export.h>
#include <wayland-server.h>
struct wl_resource;
@ -56,7 +55,7 @@ public:
Q_SIGNALS:
void outputScreencastRequested(ScreencastStreamInterface* stream, ::wl_resource *output, CursorMode mode);
void outputScreencastRequested(ScreencastStreamInterface* stream, OutputInterface *output, CursorMode mode);
void windowScreencastRequested(ScreencastStreamInterface* stream, const QString &winid, CursorMode mode);
private: