-
Notifications
You must be signed in to change notification settings - Fork 52
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
Wayland + GNOME: WindowConfig::size() sets size incorrectly #265
Comments
Hey! Unfortunately I don't have access to wayland, and this seems not be an issue using Xorg. My guess is that something can be wrong with winit and wayland. Both ways to set the size use the same way to do it, the difference is that WindowConfig is doing it before the creation of the window and set_size is doing it after. Can you share what graphics card are you using? just to know if it's nvidia. And what screen dpi? Let's see if we figure it a solution. Meanwhile I am marking this as |
I am thinking another thing, can you set |
Can you try with this branch? https://github.com/Nazariglez/notan/tree/log/size and paste here all the logs? Thanks |
Thank you for the quick replies!
|
I added some more logs to the branch, it's weird that at first everything is set right and then the draw method fails to get right the size. Can you test it again please? You can use |
Here's the output from that example. The size appears to actually be correct at first:
If I remove
And then the last three lines are repeated. |
Hey @190n thanks for the logs, I was able to found (what I think is) the same issue rust-windowing/winit#1446. I'll try to see if there is anything that we can do from notan in the next few days/weeks. |
As far I can see on the issue in winit, they tell that the size set is a "suggestion" for the OS, and that it's possible that it doesn't respect it, like wayland and swap or similar can do their own thing, so I am not sure if we can do anything more than intestead of hardcode the size to draw the quad get it from app. To be sure, can I ask you for one more test? Just |
All the same after this. |
The 3 sizes reported by winit are the same, I am not sure right now if this is intended or it's a bug, I am opening an issue on winit rust-windowing/winit#2799 |
Hey @190n, good news! I was able to get a Fedora+Wayland working on my machine and did some test (this is good because I can test anything there from now on). And the issue is fixed using the latest changes in winit. The bad news is that winit's version isn't published yet. Once published we need to wait (or help) with glutin getting updated too. So this will be a fix for notan Thanks for reporting this, all the testing, and your patience. |
This issue is stale because it has been open for 1 year with no activity. |
This is going to be fixed in the |
With the following app:
I get the following result showing the window is larger than 400x400. In the console it prints
420 x 455
. Trying other resolutions, it seems like the width is always increased by 20 and the height by 55.I'm using Arch Linux with GNOME on Wayland, and 125% display scaling.
It works properly if I use
app.window().set_size(400, 400)
.I'm not sure if this is related to #219 so I opened a separate issue.
The text was updated successfully, but these errors were encountered: