From cd0990c5818f063d22c2802d88842b43b9c32a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 26 Aug 2019 16:31:06 +0300 Subject: [PATCH] window-actor: Use new get_image() API to screen casting window content This fixes screen casting of windows consisting of multiple surfaces to work. https://gitlab.gnome.org/GNOME/mutter/merge_requests/752 --- src/compositor/meta-window-actor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 34e88a316..24e86dee8 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -2047,8 +2047,6 @@ meta_window_actor_capture_into (MetaScreenCastWindow *screen_cast_window, uint8_t *data) { MetaWindowActor *window_actor = META_WINDOW_ACTOR (screen_cast_window); - MetaWindowActorPrivate *priv = - meta_window_actor_get_instance_private (window_actor); cairo_surface_t *image; uint8_t *cr_data; int cr_stride; @@ -2059,7 +2057,7 @@ meta_window_actor_capture_into (MetaScreenCastWindow *screen_cast_window, if (meta_window_actor_is_destroyed (window_actor)) return; - image = meta_surface_actor_get_image (priv->surface, bounds); + image = meta_window_actor_get_image (window_actor, bounds); cr_data = cairo_image_surface_get_data (image); cr_width = cairo_image_surface_get_width (image); cr_height = cairo_image_surface_get_height (image);