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

Preset window dimensions are really messy (under wayland) #2230

Closed
2 tasks done
justDeeevin opened this issue Feb 3, 2024 · 6 comments
Closed
2 tasks done

Preset window dimensions are really messy (under wayland) #2230

justDeeevin opened this issue Feb 3, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@justDeeevin
Copy link

justDeeevin commented Feb 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Defining the size of the window using settings.window.size is wildly inconsistent under wayland. With settings.window.resizable set to true, the width is the number of pixels passed in, but the height has ~35 pixels added to it. With resizable set to false, both the height and width are ~20 pixels extra. I measured this as best I could with the apt package screenruler's graphical screen ruler. These numbers aren't 100% precise but they are consistent.

What is the expected behavior?

When I pass dimensions into the settings.window.size setting, the window should be created with those dimensions.

Version

crates.io release

Operating System

Linux

Do you have any log output?

No response

@justDeeevin justDeeevin added the bug Something isn't working label Feb 3, 2024
@justDeeevin justDeeevin changed the title Preset window dimensions are really messy Preset window dimensions are really messy (under wayland) Feb 3, 2024
@justDeeevin
Copy link
Author

Some digging has led me to believe this is only an issue on Wayland. :(

@justDeeevin
Copy link
Author

Yep, no problem on Windows either. This is totally a wayland thing.

@dtzxporter
Copy link
Contributor

I believe this is an upstream winit issue. Winit handles creating the window with the given dimensions and should take the frame into account.

@justDeeevin
Copy link
Author

Not sure what makes this the case, but the current master branch of iced doesn't have this problem. 🤷

@justDeeevin
Copy link
Author

justDeeevin commented Feb 3, 2024

I looked at the changelog to see if there was anything addressing this prior to making the issue. Must have been fixed by proxy of some other change.

@hecrj
Copy link
Member

hecrj commented Feb 3, 2024

Most likely fixed by #2169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants