diff --git a/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml b/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml index 54d296548..345650732 100644 --- a/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml +++ b/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml @@ -221,6 +221,9 @@ compositor coordinate space. * "size" (ii): Size of the source of the stream in the compositor coordinate space. + * "output-name" s: Xrandr name of the output in case of X11 and + wl_output.name in case of Wayland. Available only + for monitor streams. --> diff --git a/src/backends/meta-screen-cast-monitor-stream.c b/src/backends/meta-screen-cast-monitor-stream.c index ada9bc95f..5d54d6168 100644 --- a/src/backends/meta-screen-cast-monitor-stream.c +++ b/src/backends/meta-screen-cast-monitor-stream.c @@ -168,6 +168,7 @@ meta_screen_cast_monitor_stream_set_parameters (MetaScreenCastStream *stream, MetaScreenCastMonitorStream *monitor_stream = META_SCREEN_CAST_MONITOR_STREAM (stream); MetaRectangle logical_monitor_layout; + const char *output_name; logical_monitor_layout = meta_logical_monitor_get_layout (monitor_stream->logical_monitor); @@ -182,6 +183,10 @@ meta_screen_cast_monitor_stream_set_parameters (MetaScreenCastStream *stream, g_variant_new ("(ii)", logical_monitor_layout.width, logical_monitor_layout.height)); + + output_name = meta_monitor_get_connector (monitor_stream->monitor); + g_variant_builder_add (parameters_builder, "{sv}", "output-name", + g_variant_new ("s", output_name)); } static gboolean