summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2019-01-21 19:17:57 +0100
committerJonas Ådahl <jadahl@gmail.com>2019-02-26 13:39:11 +0000
commit870f38542dcb6cfcf95eb5a6d7a00c98a7442eb6 (patch)
tree2577ee7761b0718e1098f261f4253e3f7d0c2f9c
parentc22edeff1f5ad6307086d2c9fe6ab0d72aa8d17b (diff)
downloadmutter-870f38542dcb6cfcf95eb5a6d7a00c98a7442eb6.tar.gz
screen-cast-window-stream: Set the size property to the logical size
As the stream size is the logical monitor size multiplied with the ceil of the logical monitor scale, the corresponding logical size, which is what should be passed via the size property on the D-Bus object, should be the logical monitor size. https://gitlab.gnome.org/GNOME/mutter/merge_requests/413
-rw-r--r--src/backends/meta-screen-cast-window-stream.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backends/meta-screen-cast-window-stream.c b/src/backends/meta-screen-cast-window-stream.c
index 748affb38..0cb39bb14 100644
--- a/src/backends/meta-screen-cast-window-stream.c
+++ b/src/backends/meta-screen-cast-window-stream.c
@@ -44,6 +44,8 @@ struct _MetaScreenCastWindowStream
int stream_width;
int stream_height;
+ int logical_width;
+ int logical_height;
unsigned long window_unmanaged_handler_id;
};
@@ -128,8 +130,8 @@ meta_screen_cast_window_stream_set_parameters (MetaScreenCastStream *stream,
g_variant_builder_add (parameters_builder, "{sv}",
"size",
g_variant_new ("(ii)",
- bounds.width,
- bounds.height));
+ window_stream->logical_width,
+ window_stream->logical_height));
}
static void
@@ -237,6 +239,8 @@ meta_screen_cast_window_stream_initable_init (GInitable *initable,
* So we set a size equals to the size of the logical monitor for the window.
*/
scale = (int) ceil (meta_logical_monitor_get_scale (logical_monitor));
+ window_stream->logical_width = logical_monitor->rect.width;
+ window_stream->logical_height = logical_monitor->rect.height;
window_stream->stream_width = logical_monitor->rect.width * scale;
window_stream->stream_height = logical_monitor->rect.height * scale;