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

fix: two fixes around native display output #42

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

kleinesfilmroellchen
Copy link
Contributor

fix: ignore spurious zero-sized window buffers

winit+x11 usually supplies a single redraw event where the window’s backing buffer is still size zero. ignoring this case stops the event handler thread from panicking.

fix: use physical size for winit window

physical size is needed since our raw framebuffer work doesn’t care about logical pixels and associated DPI scaling. with logical size, the window is too large (or even too small) for the area that is actually used for the framebuffer.

winit+x11 usually supplies a single redraw event where the window’s backing buffer is still size zero. ignoring this case stops the event handler thread from panicking.
physical size is needed since our raw framebuffer work doesn’t care about logical pixels and associated DPI scaling. with logical size, the window is too large (or even too small) for the area that is actually used for the framebuffer.
@sbernauer
Copy link
Owner

Many thanks for your fixes and the detailed explanation!
The clippy check is failing, but as they are unrelated to this PR (nightly version moved) I fixed them in #43.

@sbernauer sbernauer merged commit a4a2dc1 into sbernauer:main Dec 30, 2024
7 of 8 checks passed
@sbernauer sbernauer mentioned this pull request Dec 30, 2024
@sbernauer
Copy link
Owner

And released as 0.16.2, thanks again! Congrats on the PR number btw :)

@kleinesfilmroellchen kleinesfilmroellchen deleted the klfr/main branch December 30, 2024 12:39
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