Skip to content

Render egui surfaces immediately after Wayland configure - #4

Merged
Ciantic merged 1 commit into
Ciantic:mainfrom
friedow:fix-external-display-paint
Sep 21, 2026
Merged

Ciantic merged 1 commit into
Ciantic:mainfrom
friedow:fix-external-display-paint

Conversation

@friedow

@friedow friedow commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Problem

On external displays under niri, wayapp windows could take approximately one second to become visible. The initial Wayland frame callback was delayed by niri because wayapp committed an empty surface and waited for the callback before rendering the first buffer.

Specifically, I stumbled upon this issue with centerpiece having a noticeable delay while opening on external screens.

Solution

Render and present the first egui frame immediately after receiving the configure event. Frame callbacks are still requested afterward for subsequent frames.

Disclaimer: A LLM has been used in the creation of this PR.

@friedow

friedow commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Hey @Ciantic, do you mind merging and releasing this one if its okay? I'd like to update centerpiece to this version :)

@Ciantic
Ciantic merged commit 5ec2c64 into Ciantic:main Sep 21, 2026
@Ciantic

Ciantic commented Sep 21, 2026

Copy link
Copy Markdown
Owner

@friedow okay, I merged it. Will test and publish to crates

@Ciantic

Ciantic commented Sep 21, 2026

Copy link
Copy Markdown
Owner

I published 0.3.2

@friedow

friedow commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Thank you :)

friedow added a commit to friedow/centerpiece that referenced this pull request Sep 22, 2026
Centerpiece could take about one second to become visible on external
displays under Niri. The issue was caused by waiting for an initial
Wayland frame callback before painting the first buffer.

I've fixed this issue in wayapp and opened a [PR over
there](Ciantic/wayapp#4). This PR depends on the
wayapp change and is waiting for that to be merged.
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