scene/surface: don't cache frame pacing output

Storing the frame pacing output in a per-scene and per-surface
struct doesn't play well with multiple scenes. outputs_update is
only triggered for outputs the scene knows about, but operates on
all outputs the surface has entered regardless of the scene. Thus
leaving an output on one scene will not refresh the frame pacing
output on other scenes, and these other scenes will operate with
a stale frame pacing output. The surface will not receive any more
wl_surface.frame done events.

This also avoids keeping a dangling pointer around when the frame
pacing output is destroyed but the output isn't added in the scene.

References: https://github.com/swaywm/sway/issues/8885
This commit is contained in:
Simon Ser 2025-12-30 20:13:23 +01:00
parent 2699b68b34
commit b094f8aeb3
2 changed files with 4 additions and 8 deletions

View file

@ -126,10 +126,6 @@ struct wlr_scene_surface {
struct {
struct wlr_box clip;
// Output used for frame pacing (surface frame callbacks, presentation
// time feedback, etc), may be NULL
struct wlr_output *frame_pacing_output;
struct wlr_addon addon;
struct wl_listener outputs_update;