[mutter] screen-cast-window-stream: Set the size property to the logical size



commit 870f38542dcb6cfcf95eb5a6d7a00c98a7442eb6
Author: Jonas Ådahl <jadahl gmail com>
Date:   Mon Jan 21 19:17:57 2019 +0100

    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

 src/backends/meta-screen-cast-window-stream.c | 8 ++++++--
 1 file 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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]