From 10d1de2bdf559de77b5fc89c6338f8606e63aaa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 25 Jun 2021 18:29:06 +0200 Subject: [PATCH] screen-cast/monitor-src: Always set before-paint watch We weren't setting it for META_SCREEN_CAST_CURSOR_MODE_EMBEDDED, so that case didn't work correctly with scanouts. Suggested by Georges Basile Stavracas Neto. Part-of: --- src/backends/meta-screen-cast-monitor-stream-src.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/backends/meta-screen-cast-monitor-stream-src.c b/src/backends/meta-screen-cast-monitor-stream-src.c index b85c44fe1..ac6be6730 100644 --- a/src/backends/meta-screen-cast-monitor-stream-src.c +++ b/src/backends/meta-screen-cast-monitor-stream-src.c @@ -340,13 +340,14 @@ reattach_watches (MetaScreenCastMonitorStreamSrc *monitor_src) meta_stage_remove_watch (META_STAGE (stage), l->data); g_clear_pointer (&monitor_src->watches, g_list_free); + add_view_watches (monitor_src, + META_STAGE_WATCH_BEFORE_PAINT, + before_stage_painted); + switch (meta_screen_cast_stream_get_cursor_mode (stream)) { case META_SCREEN_CAST_CURSOR_MODE_METADATA: case META_SCREEN_CAST_CURSOR_MODE_HIDDEN: - add_view_watches (monitor_src, - META_STAGE_WATCH_BEFORE_PAINT, - before_stage_painted); add_view_watches (monitor_src, META_STAGE_WATCH_AFTER_ACTOR_PAINT, stage_painted);