From a6f94696e2e8ade9e800f3b37092a5f40e22cf38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 3 Apr 2020 17:12:58 +0200 Subject: [PATCH] window-actor: Set viewport when blitting to screencast fb This fixes an issue where a non-maximized screen casted window would be stretched to fill the whole screen cast stream, instead of just the crop that corresponds to the current window size. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1174 --- src/compositor/meta-window-actor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 92355a918..31e0cb607 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1300,6 +1300,7 @@ meta_window_actor_blit_to_framebuffer (MetaScreenCastWindow *screen_cast_window, cogl_color_init_from_4ub (&clear_color, 0, 0, 0, 0); cogl_framebuffer_clear (framebuffer, COGL_BUFFER_BIT_COLOR, &clear_color); cogl_framebuffer_orthographic (framebuffer, 0, 0, width, height, 0, 1.0); + cogl_framebuffer_set_viewport (framebuffer, 0, 0, width, height); meta_rectangle_scale_double (bounds, resource_scale, META_ROUNDING_STRATEGY_GROW,