-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Rendered window content size is out of sync and padded #314
Comments
Hi! The border is expected when scaling to non-integer multiples. When you say "the size is fine" on what I presume is the first frame shown... I assume you say this because it doesn't have a border in this case. That would actually be a bug. The image should always have a border when the window surface size is not an exact integer multiple of the pixel buffer size. Measuring the frame size in your screenshot, it is exactly 400x400, which is the requested size in the demo: pixels/examples/raqote-winit/src/main.rs Lines 16 to 17 in 9f7896c
Measuring the window's inner size, it is something like 420x445. The border is 100% correct in the screenshot. Without more information, I can only guess that there are two issues:
Both of these are entirely contained in the example code, so the main library crate isn't affected. And because the issue described cannot be reproduced on Windows or macOS, it sounds like this is just another Wayland snowflake behavior as implemented in This needs some more information and a closer investigation. But at the moment, I think the bug is not quite what is described in the OP. |
Thanks! You're right down to the pixel. it is true that the resize event is send upon interaction. The solution in my code (not the example, though) is to add similar to the |
Just keep in mind that the |
Right, on the raqote-winit demo, I tried to resize the buffer but forgot that the
That would be a great feature. My main concern in the OP has been solved, so closing this.. |
I run the
raquote-winit
example in GNOME with Wayland and get the following result.It is padded and the size is out of sync. This is the case in animated render.
For static render, at the first render (before the cursor enter or interact), the size is fine. But soon as I touch the window, it goes out of sync and padded as in the picture.
The padded is actually passing through, as my cursor become and edit handle on top of a terminal.
The text was updated successfully, but these errors were encountered: