window-stream-src: Ensure initial frame is recorded

MetaScreenCastWindowStreamSrc connects to the "damaged" signal of
MetaWindowActor. This signal is not exactly tied to the paint cycle
of the stage, and a damage may take quite a while to arrive when
a client doesn't want to draw anything. For that reason, the window
screencast can start empty, waiting for a damage to arrive.

Ensure at least one frame is recorded when enabling the window stream.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/1097

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1129
This commit is contained in:
Georges Basile Stavracas Neto 2020-03-17 16:55:39 -03:00
parent cdd27d0e53
commit 37742c5cde

View File

@ -378,6 +378,8 @@ meta_screen_cast_window_stream_src_enable (MetaScreenCastStreamSrc *src)
case META_SCREEN_CAST_CURSOR_MODE_HIDDEN:
break;
}
meta_screen_cast_stream_src_maybe_record_frame (src);
}
static void