Skip to content

desktop: don't send frame callbacks to unmapped surfaces - #2168

Open
rayslava wants to merge 1 commit into
Smithay:masterfrom
rayslava:fix/frame-callbacks-unmapped
Open

rayslava wants to merge 1 commit into
Smithay:masterfrom
rayslava:fix/frame-callbacks-unmapped

Conversation

@rayslava

Copy link
Copy Markdown

Description

send_frames_surface_tree sends frame callbacks to surfaces without a buffer, which the renderer never draws. Firefox with gfx.webrender.compositor.force-enabled=true takes such a callback as proof its layer-root subsurface is presented, never attaches a buffer to it, and shows a black window.

This skips surfaces whose renderer state has no view, together with their children. Surfaces without renderer state keep the old behaviour, and mapped but hidden surfaces still get the throttled fallback (unlike #2138).

AI assistance is disclosed in the commit message, per the AI policy.

Checklist

send_frames_surface_tree descended into every subsurface and its overdue
fallback fired for surfaces that never had a buffer. The renderer skips
such surfaces and everything below them, so they are not presented.

Firefox's WebRender compositor takes a frame callback as proof that its
layer surface is presented: it never attaches the placeholder buffer
that would map it, and the window stays black.

Skip surfaces whose renderer state has no view, together with their
children. Surfaces without renderer state keep the previous behaviour,
so compositors that manage buffers themselves are unaffected.

Developed with AI assistance (Claude Code, OpenAI Codex); all changes have
been reviewed and are understood by the author.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant