Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid glitch on first frame #431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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