Skip to content

screen-cast/stream: Pass redraw clip to stage watches instead of paint context

Jonas Dreßler requested to merge verdre/mutter:crash-fix into main

The virtual stream source with CURSOR_MODE_EMBEDDED uses META_STAGE_WATCH_AFTER_PAINT as the callback for recording its frame. In this stage of the paint though, there is no ClutterPaintContext anymore (there only is a paint context during the paint, not afterwards). The callback (actors_painted()) tries to get the redraw clip from the paint context, and we end up with a NULL pointer crash.

We actually do still have a redraw clip at this point, so because everyone uses the paint context to get the redraw clip anyway, just pass the redraw clip to the stage watches directly.

Merge request reports

Loading