diff --git a/src/wayland/screencast_v1_interface.cpp b/src/wayland/screencast_v1_interface.cpp index 3f6b872bb7..69adc97d89 100644 --- a/src/wayland/screencast_v1_interface.cpp +++ b/src/wayland/screencast_v1_interface.cpp @@ -9,12 +9,13 @@ #include "output_interface.h" #include +#include #include "qwayland-server-zkde-screencast-unstable-v1.h" namespace KWaylandServer { -static int s_version = 2; +static int s_version = 3; class ScreencastStreamV1InterfacePrivate : public QtWaylandServer::zkde_screencast_stream_unstable_v1 { @@ -111,6 +112,21 @@ public: ScreencastV1Interface::CursorMode(pointer)); } + void zkde_screencast_unstable_v1_stream_region(QtWaylandServer::zkde_screencast_unstable_v1::Resource *resource, + uint32_t stream, + int32_t x, + int32_t y, + uint32_t width, + uint32_t height, + wl_fixed_t scale, + uint32_t pointer) override + { + Q_EMIT q->regionScreencastRequested(createStream(resource, stream), + {x, y, int(width), int(height)}, + wl_fixed_to_double(scale), + ScreencastV1Interface::CursorMode(pointer)); + } + void zkde_screencast_unstable_v1_destroy(Resource *resource) override { wl_resource_destroy(resource->handle); diff --git a/src/wayland/screencast_v1_interface.h b/src/wayland/screencast_v1_interface.h index b538810ba3..120c2668c0 100644 --- a/src/wayland/screencast_v1_interface.h +++ b/src/wayland/screencast_v1_interface.h @@ -58,6 +58,7 @@ Q_SIGNALS: void outputScreencastRequested(ScreencastStreamV1Interface *stream, OutputInterface *output, CursorMode mode); void virtualOutputScreencastRequested(ScreencastStreamV1Interface *stream, const QString &name, const QSize &size, double scaling, CursorMode mode); void windowScreencastRequested(ScreencastStreamV1Interface *stream, const QString &winid, CursorMode mode); + void regionScreencastRequested(ScreencastStreamV1Interface *stream, const QRect &geometry, qreal scaling, CursorMode mode); private: QScopedPointer d;