Skip to content

Comments

Avoid glitch on first frame#431

Closed
stacyharper wants to merge 1 commit intoCloudef:masterfrom
stacyharper:glitch-first
Closed

Avoid glitch on first frame#431
stacyharper wants to merge 1 commit intoCloudef:masterfrom
stacyharper:glitch-first

Conversation

@stacyharper
Copy link
Contributor

With the recent wlroots scene-graph api changes, we no longer receive the wl_display@enter output event before the very first frame. Meaning that the first draw max_height is 640. This cause a visual glitch, and a useless loop.

With this change, we use instead the minimum height of the outputs.

With the recent wlroots scene-graph api changes, we no longer receive
the wl_display@enter output event before the very first frame. Meaning
that the first draw max_height is 640. This cause a visual glitch, and
a useless loop.

With this change, we use instead the minimum height of the outputs.
@Cloudef
Copy link
Owner

Cloudef commented Oct 30, 2024

Does this work with other compositors as well?

@stacyharper
Copy link
Contributor Author

I haven't tried, but this is an non-greedy solution. It will works great when having only one wl_output. But can still cause edge case issue, when having multiple, with different dimensions. And when no output are enabled (locked screen), we fallback to 640.

It is not a perfect fix.. We would need a way to know which wl_output we will use, before committing the first frame. A kind of get_preferred_output, similar to the get_preferred_scale that we receive early in the flow. I'm still investigating if this is possible somehow. I'll also ask Wayland folks if this has been asked already.

@stacyharper
Copy link
Contributor Author

I findout that this MR is still in this state. This patch still feels like a valid improvement. Even if the solution isn't perfect, it should looks great on most of the user situations. Is it possible to merge this as it?

@stacyharper
Copy link
Contributor Author

Closed in favor of #453.

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.

2 participants